Package org.openprovenance.prov.vanilla
Class QualifiedName
- java.lang.Object
-
- org.openprovenance.prov.vanilla.QualifiedName
-
- All Implemented Interfaces:
QualifiedName
public class QualifiedName extends Object implements QualifiedName
-
-
Field Summary
Fields Modifier and Type Field Description protected QualifiedNameref
-
Constructor Summary
Constructors Constructor Description QualifiedName(String namespaceURI, String localPart, String prefix)
-
Method Summary
Modifier and Type Method Description booleanequals(Object objectToTest)StringgetLocalPart()Get the local part of this QualifiedName.StringgetNamespaceURI()Get the Namespace URI of this QualifiedName.StringgetPrefix()Get the prefix of this Qualified Name.StringgetUri()inthashCode()Generate the hash code for thisQualifiedName.voidsetLocalPart(String local)Set the local part of this QualifiedName.voidsetNamespaceURI(String namespaceURI)Set the Namespace URI of this QualifiedName.voidsetPrefix(String prefix)voidsetUri(String uri)QNametoQName()Converts this QualifiedName to a valid xsd:QName by unescaping \-characters in the local names, and _-encoding the local name.StringtoString()
-
-
-
Field Detail
-
ref
protected QualifiedName ref
-
-
Method Detail
-
toQName
public QName toQName()
Description copied from interface:QualifiedNameConverts this QualifiedName to a valid xsd:QName by unescaping \-characters in the local names, and _-encoding the local name.- Specified by:
toQNamein interfaceQualifiedName- Returns:
- a valid javax.xml.namespace.QName
- See Also:
- a reversible encoding
-
getUri
public String getUri()
- Specified by:
getUriin interfaceQualifiedName
-
setUri
public void setUri(String uri)
- Specified by:
setUriin interfaceQualifiedName
-
getLocalPart
public String getLocalPart()
Description copied from interface:QualifiedNameGet the local part of this QualifiedName.- Specified by:
getLocalPartin interfaceQualifiedName- Returns:
- a string, the local part of this QualifiedName.
-
setLocalPart
public void setLocalPart(String local)
Description copied from interface:QualifiedNameSet the local part of this QualifiedName.- Specified by:
setLocalPartin interfaceQualifiedName- Parameters:
local- the local part
-
getNamespaceURI
public String getNamespaceURI()
Description copied from interface:QualifiedNameGet the Namespace URI of this QualifiedName.- Specified by:
getNamespaceURIin interfaceQualifiedName- Returns:
- a string, namespace URI of this QualifiedName.
-
setNamespaceURI
public void setNamespaceURI(String namespaceURI)
Description copied from interface:QualifiedNameSet the Namespace URI of this QualifiedName.- Specified by:
setNamespaceURIin interfaceQualifiedName- Parameters:
namespaceURI- the namespace URI
-
getPrefix
public String getPrefix()
Description copied from interface:QualifiedNameGet the prefix of this Qualified Name.- Specified by:
getPrefixin interfaceQualifiedName- Returns:
- a string, prefix for the Qualifed Name.
-
setPrefix
public void setPrefix(String prefix)
- Specified by:
setPrefixin interfaceQualifiedName
-
equals
public final boolean equals(Object objectToTest)
- Specified by:
equalsin interfaceQualifiedName- Overrides:
equalsin classObject
-
hashCode
public final int hashCode()
Description copied from interface:QualifiedNameGenerate the hash code for this
QualifiedName.The hash code is calculated using both the Namespace URI and the local part of the
QualifiedName. The prefix is NOT used to calculate the hash code.This method satisfies the general contract of
Object.hashCode().- Specified by:
hashCodein interfaceQualifiedName- Overrides:
hashCodein classObject- Returns:
- hash code for this
QualifiedNameObject
-
-