com.ontotext.wsmo4j.common
Class IRIImpl

java.lang.Object
  extended by com.ontotext.wsmo4j.common.IRIImpl
All Implemented Interfaces:
Serializable, org.omwg.logicalexpression.terms.Term, org.wsmo.common.Identifier, org.wsmo.common.IRI

public class IRIImpl
extends Object
implements org.wsmo.common.IRI, Serializable

See Also:
Serialized Form

Constructor Summary
IRIImpl(String iri)
          Creates IRI object, does heuristics for namespace/localname split
IRIImpl(String ns, String ln)
          Creates IRI with the knowledge of sepration between namespace and localname.
 
Method Summary
 void accept(org.omwg.logicalexpression.terms.Visitor v)
           
 boolean equals(Object object)
          equality check.
 String getLocalName()
          retrieve the <localname> part of the iri.
 String getNamespace()
          retrieve the namespace part of iri
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IRIImpl

public IRIImpl(String iri)
        throws IllegalArgumentException
Creates IRI object, does heuristics for namespace/localname split

Parameters:
iri - String representation of IRI
Throws:
IllegalArgumentException - in case no legal IRI is supplied

IRIImpl

public IRIImpl(String ns,
               String ln)
        throws IllegalArgumentException
Creates IRI with the knowledge of sepration between namespace and localname.

Parameters:
ns - String containing the part of the IRI that is the Namespace
ln - String containing the part of the IRI that is the localname
Throws:
IllegalArgumentExpression -

in case the IRI is not legal according to the IRI spec.

IllegalArgumentException
Method Detail

getLocalName

public String getLocalName()
retrieve the <localname> part of the iri.

Specified by:
getLocalName in interface org.wsmo.common.IRI
Returns:
a localname as string

getNamespace

public String getNamespace()
retrieve the namespace part of iri

Specified by:
getNamespace in interface org.wsmo.common.IRI
Returns:
the namespace or null in case the namespace is not known.

toString

public String toString()
Overrides:
toString in class Object

accept

public void accept(org.omwg.logicalexpression.terms.Visitor v)
Specified by:
accept in interface org.omwg.logicalexpression.terms.Term
See Also:
Term.accept(org.omwg.logicalexpression.terms.Visitor)

equals

public boolean equals(Object object)
equality check.

Overrides:
equals in class Object
Parameters:
object - to compare with
Returns:
true if object is lexical an identical IRI
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.