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 QualifiedName
ref
-
Constructor Summary
Constructors Constructor Description QualifiedName(String namespaceURI, String localPart, String prefix)
-
Method Summary
Modifier and Type Method Description boolean
equals(Object objectToTest)
String
getLocalPart()
Get the local part of this QualifiedName.String
getNamespaceURI()
Get the Namespace URI of this QualifiedName.String
getPrefix()
Get the prefix of this Qualified Name.String
getUri()
int
hashCode()
Generate the hash code for thisQualifiedName
.void
setLocalPart(String local)
Set the local part of this QualifiedName.void
setNamespaceURI(String namespaceURI)
Set the Namespace URI of this QualifiedName.void
setPrefix(String prefix)
void
setUri(String uri)
QName
toQName()
Converts this QualifiedName to a valid xsd:QName by unescaping \-characters in the local names, and _-encoding the local name.String
toString()
-
-
-
Field Detail
-
ref
protected QualifiedName ref
-
-
Method Detail
-
toQName
public QName toQName()
Description copied from interface:QualifiedName
Converts this QualifiedName to a valid xsd:QName by unescaping \-characters in the local names, and _-encoding the local name.- Specified by:
toQName
in interfaceQualifiedName
- Returns:
- a valid javax.xml.namespace.QName
- See Also:
- a reversible encoding
-
getUri
public String getUri()
- Specified by:
getUri
in interfaceQualifiedName
-
setUri
public void setUri(String uri)
- Specified by:
setUri
in interfaceQualifiedName
-
getLocalPart
public String getLocalPart()
Description copied from interface:QualifiedName
Get the local part of this QualifiedName.- Specified by:
getLocalPart
in interfaceQualifiedName
- Returns:
- a string, the local part of this QualifiedName.
-
setLocalPart
public void setLocalPart(String local)
Description copied from interface:QualifiedName
Set the local part of this QualifiedName.- Specified by:
setLocalPart
in interfaceQualifiedName
- Parameters:
local
- the local part
-
getNamespaceURI
public String getNamespaceURI()
Description copied from interface:QualifiedName
Get the Namespace URI of this QualifiedName.- Specified by:
getNamespaceURI
in interfaceQualifiedName
- Returns:
- a string, namespace URI of this QualifiedName.
-
setNamespaceURI
public void setNamespaceURI(String namespaceURI)
Description copied from interface:QualifiedName
Set the Namespace URI of this QualifiedName.- Specified by:
setNamespaceURI
in interfaceQualifiedName
- Parameters:
namespaceURI
- the namespace URI
-
getPrefix
public String getPrefix()
Description copied from interface:QualifiedName
Get the prefix of this Qualified Name.- Specified by:
getPrefix
in interfaceQualifiedName
- Returns:
- a string, prefix for the Qualifed Name.
-
setPrefix
public void setPrefix(String prefix)
- Specified by:
setPrefix
in interfaceQualifiedName
-
equals
public final boolean equals(Object objectToTest)
- Specified by:
equals
in interfaceQualifiedName
- Overrides:
equals
in classObject
-
hashCode
public final int hashCode()
Description copied from interface:QualifiedName
Generate 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:
hashCode
in interfaceQualifiedName
- Overrides:
hashCode
in classObject
- Returns:
- hash code for this
QualifiedName
Object
-
-