FileDocCategorySizeDatePackage
XMLResourceIdentifierImpl.javaAPI DocJava SE 6 API7236Tue Jun 10 00:22:52 BST 2008com.sun.org.apache.xerces.internal.util

XMLResourceIdentifierImpl

public class XMLResourceIdentifierImpl extends Object implements XMLResourceIdentifier
The XMLResourceIdentifierImpl class is an implementation of the XMLResourceIdentifier interface which defines the location identity of a resource.
author
Andy Clark
version
$Id: XMLResourceIdentifierImpl.java,v 1.2.6.1 2005/09/05 09:00:29 neerajbj Exp $

Fields Summary
protected String
fPublicId
The public identifier.
protected String
fLiteralSystemId
The literal system identifier.
protected String
fBaseSystemId
The base system identifier.
protected String
fExpandedSystemId
The expanded system identifier.
protected String
fNamespace
The namespace of the resource.
Constructors Summary
public XMLResourceIdentifierImpl()
Constructs an empty resource identifier.

public XMLResourceIdentifierImpl(String publicId, String literalSystemId, String baseSystemId, String expandedSystemId)
Constructs a resource identifier.

param
publicId The public identifier.
param
literalSystemId The literal system identifier.
param
baseSystemId The base system identifier.
param
expandedSystemId The expanded system identifier.

        setValues(publicId, literalSystemId, baseSystemId,
                  expandedSystemId, null);
    
public XMLResourceIdentifierImpl(String publicId, String literalSystemId, String baseSystemId, String expandedSystemId, String namespace)
Constructs a resource identifier.

param
publicId The public identifier.
param
literalSystemId The literal system identifier.
param
baseSystemId The base system identifier.
param
expandedSystemId The expanded system identifier.
param
namespace The namespace.

        setValues(publicId, literalSystemId, baseSystemId,
                  expandedSystemId, namespace);
    
Methods Summary
public voidclear()
Clears the values.

        fPublicId = null;
        fLiteralSystemId = null;
        fBaseSystemId = null;
        fExpandedSystemId = null;
        fNamespace = null;
    
public java.lang.StringgetBaseSystemId()
Returns the base URI against which the literal SystemId is to be resolved.

        return fBaseSystemId;
    
public java.lang.StringgetExpandedSystemId()
Returns the expanded system identifier.

        return fExpandedSystemId;
    
public java.lang.StringgetLiteralSystemId()
Returns the literal system identifier.

        return fLiteralSystemId;
    
public java.lang.StringgetNamespace()
Returns the namespace of the resource.

        return fNamespace;
    
public java.lang.StringgetPublicId()
Returns the public identifier.

        return fPublicId;
    
public inthashCode()
Returns a hash code for this object.

        int code = 0;
        if (fPublicId != null) {
            code += fPublicId.hashCode();
        }
        if (fLiteralSystemId != null) {
            code += fLiteralSystemId.hashCode();
        }
        if (fBaseSystemId != null) {
            code += fBaseSystemId.hashCode();
        }
        if (fExpandedSystemId != null) {
            code += fExpandedSystemId.hashCode();
        }
        if (fNamespace != null) {
            code += fNamespace.hashCode();
        }
        return code;
    
public voidsetBaseSystemId(java.lang.String baseSystemId)
Sets the base system identifier.

        fBaseSystemId = baseSystemId;
    
public voidsetExpandedSystemId(java.lang.String expandedSystemId)
Sets the expanded system identifier.

        fExpandedSystemId = expandedSystemId;
    
public voidsetLiteralSystemId(java.lang.String literalSystemId)
Sets the literal system identifier.

        fLiteralSystemId = literalSystemId;
    
public voidsetNamespace(java.lang.String namespace)
Sets the namespace of the resource.

        fNamespace = namespace;
    
public voidsetPublicId(java.lang.String publicId)
Sets the public identifier.

        fPublicId = publicId;
    
public voidsetValues(java.lang.String publicId, java.lang.String literalSystemId, java.lang.String baseSystemId, java.lang.String expandedSystemId)
Sets the values of the resource identifier.

        setValues(publicId, literalSystemId, baseSystemId,
                  expandedSystemId, null);
    
public voidsetValues(java.lang.String publicId, java.lang.String literalSystemId, java.lang.String baseSystemId, java.lang.String expandedSystemId, java.lang.String namespace)
Sets the values of the resource identifier.

        fPublicId = publicId;
        fLiteralSystemId = literalSystemId;
        fBaseSystemId = baseSystemId;
        fExpandedSystemId = expandedSystemId;
        fNamespace = namespace;
    
public java.lang.StringtoString()
Returns a string representation of this object.

        StringBuffer str = new StringBuffer();
        if (fPublicId != null) {
            str.append(fPublicId);
        }
        str.append(':");
        if (fLiteralSystemId != null) {
            str.append(fLiteralSystemId);
        }
        str.append(':");
        if (fBaseSystemId != null) {
            str.append(fBaseSystemId);
        }
        str.append(':");
        if (fExpandedSystemId != null) {
            str.append(fExpandedSystemId);
        }
        str.append(':");
        if (fNamespace != null) {
            str.append(fNamespace);
        }
        return str.toString();