org.deri.wsmo4j.io.serializer.wsml
Class VisitorSerializeWSMLTerms

java.lang.Object
  extended by org.deri.wsmo4j.io.serializer.wsml.VisitorSerializeWSMLTerms
All Implemented Interfaces:
org.omwg.logicalexpression.terms.Visitor

public class VisitorSerializeWSMLTerms
extends Object
implements org.omwg.logicalexpression.terms.Visitor

Concrete Visitor class. For each visited term, a String is built.

See Also:
Visitor

Constructor Summary
VisitorSerializeWSMLTerms(org.wsmo.common.TopEntity nsC)
           
 
Method Summary
static String escapeNonSQNameSymbols(String sqname)
           
 String getSerializedObject()
          All serialized elements are added to a vector.
 void setAtoms2ConstructedTerms(Map atoms2ConstructedTerms)
           
 void visitComplexDataValue(org.omwg.ontology.ComplexDataValue value)
           
 void visitConstructedTerm(org.omwg.logicalexpression.terms.ConstructedTerm t)
          Builds a String representing the ConstructedTerm and adds it to a vector.
 void visitIRI(org.wsmo.common.IRI t)
          Builds a String representing the IRI and adds it to a vector.
 void visitNumberedID(org.omwg.logicalexpression.terms.NumberedAnonymousID t)
          Builds a String representing the Numbered Anonymous ID and adds it to a vector.
 void visitSimpleDataValue(org.omwg.ontology.SimpleDataValue value)
           
 void visitUnnumberedID(org.wsmo.common.UnnumberedAnonymousID t)
          Builds a String representing the Unnumbered Anonymous ID and adds it to a vector.
 void visitVariable(org.omwg.ontology.Variable t)
          Builds a String representing the Variable and adds it to a vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisitorSerializeWSMLTerms

public VisitorSerializeWSMLTerms(org.wsmo.common.TopEntity nsC)
Parameters:
nsC - TopEntity
See Also:
VisitorSerializeWSML.VisitorSerializeWSML(TopEntity)
Method Detail

setAtoms2ConstructedTerms

public void setAtoms2ConstructedTerms(Map atoms2ConstructedTerms)

visitConstructedTerm

public void visitConstructedTerm(org.omwg.logicalexpression.terms.ConstructedTerm t)
Builds a String representing the ConstructedTerm and adds it to a vector.

Specified by:
visitConstructedTerm in interface org.omwg.logicalexpression.terms.Visitor
Parameters:
t - ConstructedTerm to be serialized
See Also:
Visitor.visitConstructedTerm(org.omwg.logicalexpression.terms.ConstructedTerm)

visitVariable

public void visitVariable(org.omwg.ontology.Variable t)
Builds a String representing the Variable and adds it to a vector.

Specified by:
visitVariable in interface org.omwg.logicalexpression.terms.Visitor
Parameters:
t - Variable to be serialized
See Also:
org.omwg.logicalexpression.terms.Visitor#visitVariable(org.omwg.logicalexpression.terms.Variable)

visitComplexDataValue

public void visitComplexDataValue(org.omwg.ontology.ComplexDataValue value)
Specified by:
visitComplexDataValue in interface org.omwg.logicalexpression.terms.Visitor

visitSimpleDataValue

public void visitSimpleDataValue(org.omwg.ontology.SimpleDataValue value)
Specified by:
visitSimpleDataValue in interface org.omwg.logicalexpression.terms.Visitor

visitUnnumberedID

public void visitUnnumberedID(org.wsmo.common.UnnumberedAnonymousID t)
Builds a String representing the Unnumbered Anonymous ID and adds it to a vector.

Specified by:
visitUnnumberedID in interface org.omwg.logicalexpression.terms.Visitor
Parameters:
t - UnNBAnonymousID to be serialized
See Also:
org.omwg.logicalexpression.terms.Visitor#visitAnonymousID(org.omwg.logicalexpression.terms.UnNbAnonymousID)

visitNumberedID

public void visitNumberedID(org.omwg.logicalexpression.terms.NumberedAnonymousID t)
Builds a String representing the Numbered Anonymous ID and adds it to a vector.

Specified by:
visitNumberedID in interface org.omwg.logicalexpression.terms.Visitor
Parameters:
t - NbAnonymousID to be serialized
See Also:
org.omwg.logicalexpression.terms.Visitor#visitNbAnonymousID(org.omwg.logicalexpression.terms.NbAnonymousID)

visitIRI

public void visitIRI(org.wsmo.common.IRI t)
Builds a String representing the IRI and adds it to a vector.

Specified by:
visitIRI in interface org.omwg.logicalexpression.terms.Visitor
Parameters:
t - IRI to be serialized
See Also:
org.omwg.logicalexpression.terms.Visitor#visitIRI(org.omwg.logicalexpression.terms.IRI)

escapeNonSQNameSymbols

public static String escapeNonSQNameSymbols(String sqname)

getSerializedObject

public String getSerializedObject()
All serialized elements are added to a vector. This method removes the first serialized object from this vector and shifts any subsequent objects to the left (subtracts one from their indices).

Returns:
the serialized String object that is the first element in this vector


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