001: /*
002: * This file is part of the WfMOpen project.
003: * Copyright (C) 2001-2006 Danet GmbH (www.danet.de), BU BTS.
004: * All rights reserved.
005: *
006: * This program is free software; you can redistribute it and/or modify
007: * it under the terms of the GNU General Public License as published by
008: * the Free Software Foundation; either version 2 of the License, or
009: * (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * $Id: DefaultExternalReference.java,v 1.1 2007/02/27 14:34:18 drmlipp Exp $
021: *
022: * $Log: DefaultExternalReference.java,v $
023: * Revision 1.1 2007/02/27 14:34:18 drmlipp
024: * Some refactoring to reduce cyclic dependencies.
025: *
026: * Revision 1.3 2006/11/20 09:52:37 drmlipp
027: * Fixed problems with using URL class.
028: *
029: * Revision 1.2 2006/11/19 21:53:47 mlipp
030: * Finished support for native Java types.
031: *
032: * Revision 1.1 2006/11/19 11:16:35 mlipp
033: * Made ExternalReference an interface.
034: *
035: * Revision 1.1 2006/11/17 16:16:12 drmlipp
036: * Started support for Java native types.
037: *
038: */
039: package de.danet.an.workflow.util;
040:
041: import java.io.Serializable;
042: import java.net.URI;
043:
044: import de.danet.an.workflow.api.ExternalReference;
045:
046: /**
047: * This class provides an ExternalReference with additional support
048: * for handling Java types.
049: *
050: * @author Michael Lipp
051: */
052: public class DefaultExternalReference implements ExternalReference,
053: Serializable {
054:
055: private URI location;
056: private String xref;
057: private String namespace;
058:
059: /**
060: * Creates an instance of <code>ExtExternalReference</code>
061: * with all attributes initialized to the given values.
062: * @param location the location information of the external document
063: * @param xref the identity of the entity within the external
064: * document (may be <code>null</code>)
065: * @param namespace the scope in which the entity is defined (may
066: * be <code>null</code>)
067: */
068: public DefaultExternalReference(URI location, String xref,
069: String namespace) {
070: this .location = location;
071: this .xref = xref;
072: this .namespace = namespace;
073: }
074:
075: /**
076: * Returns the location information of the external document.
077: * @return location information
078: */
079: public URI location() {
080: return location;
081: }
082:
083: /**
084: * Returns the identity of the entity within the external document
085: * or <code>null</code> if no such information is supplied.
086: * @return identity of entity
087: */
088: public String xref() {
089: return xref;
090: }
091:
092: /**
093: * Returns the scope in which the entity is defined or
094: * <code>null</code> if no such information is supplied.
095: * @return namespace information
096: */
097: public String namespace() {
098: return namespace;
099: }
100: }
|