::= '%" | "/" | "?" | "#"
Note: following two URN are lexically equivalent
URN:foo:a123,456
urn:FOO:a123,456
-
URN(String)
- This constructor takes a string and parse it to fill the
URN structure
-
equals(Object)
- Checks equiality of the passed object with this object.
-
getCreationDomain()
-
Return the string representation of the creation domain.
-
getCreationDomainURN()
-
Return the the creation domain.
-
getNamingAuthority()
- Returns the naming authoruty for this URN.
-
getNID()
- Return the NID part of the URN
-
getNSS()
- Return the NSS part of the URN
-
hashCode()
- hashCode of the URN
-
toString()
-
Returns a string representation of the URN
URN
public URN(String urn) throws MalformedURNException
- This constructor takes a string and parse it to fill the
URN structure
- Parameters:
- urn - - string representation of a URN
getNSS
public String getNSS()
- Return the NSS part of the URN
- Returns:
- a string that represent the NSS( NameSpace Specific String)
getNID
public String getNID()
- Return the NID part of the URN
- Returns:
- a string that represent the NID ( NameSpace Identifier)
getNamingAuthority
public URN getNamingAuthority()
- Returns the naming authoruty for this URN. Currently it is the
string before the last slash of the NSS
- Returns:
- the URN of its naming authority
getCreationDomain
public String getCreationDomain()
- Return the string representation of the creation domain. In our URN, the first component
of the NSS is the creation domain
- Returns:
- the first componnent of NSS as creation domain, if there is only one component
the NSS is the creation domain
getCreationDomainURN
public URN getCreationDomainURN()
- Return the the creation domain. In our URN, the first component
of the NSS is the creation domain
- Returns:
- URN first componnent of NSS as creation domain, if there is only one component
the NSS is the creation domain
toString
public String toString()
- Returns a string representation of the URN
- Returns:
- a string representation of the URN
- Overrides:
- toString in class Object
equals
public boolean equals(Object obj)
- Checks equiality of the passed object with this object. Note: the NID is case insensitive.
The following two URN are equivalent
URN:foo:a123,456
urn:FOO:a123,456
- Returns:
- true is equal
false otherwise
- Overrides:
- equals in class Object
hashCode
public int hashCode()
- hashCode of the URN
- Returns:
- int value of the hashCode of this URN
- Overrides:
- hashCode in class Object
All Packages Class Hierarchy This Package Previous Next Index