eu.monnetproject.lemon.impl
Class FormImpl

java.lang.Object
  extended by eu.monnetproject.lemon.URIValue
      extended by eu.monnetproject.lemon.URIElement
          extended by eu.monnetproject.lemon.impl.LemonElementImpl
              extended by eu.monnetproject.lemon.impl.FormImpl
All Implemented Interfaces:
IntrospectableElement, ReaderAccepter, LemonElement, LemonElementOrPredicate, LexicalForm, Serializable

public class FormImpl
extends LemonElementImpl
implements LexicalForm

Instantiated via LemonFactoryImpl

Author:
John McCrae
See Also:
Serialized Form

Field Summary
 HashMap<Representation,Collection<Text>> reps
           
 
Fields inherited from class eu.monnetproject.lemon.impl.LemonElementImpl
checkRemote, model, RDF_TYPE, referencers
 
Method Summary
 ReaderAccepter accept(URI pred, String value, LinguisticOntology lingOnto, AccepterFactory factory)
           
 void accept(URI pred, String value, String lang, LinguisticOntology lingOnto, AccepterFactory factory)
           
 ReaderAccepter accept(URI pred, URI value, LinguisticOntology lingOnto, AccepterFactory factory)
           
 boolean addFormVariant(FormVariant formVariant, LexicalForm formVariantVal)
          Add a variant of this form
 boolean addRepresentation(Representation representation, Text representationVal)
          Add an alternative representation of the form
 void clearAll()
           
protected  boolean follow(LemonPredicate predicate)
           
 Map<URI,Collection<Object>> getElements()
           
 Collection<LexicalForm> getFormVariant(FormVariant formVariant)
          Get a particular variant set of this form
 Map<FormVariant,Collection<LexicalForm>> getFormVariants()
          Get any variants of this form
 Collection<Text> getRepresentation(Representation representation)
          Get a particular set of representations of the form
 Map<Representation,Collection<Text>> getRepresentations()
          Get the alternative representations of the form
 Text getWrittenRep()
          Get the primary written representation of the form
 void merge(ReaderAccepter accepter, LinguisticOntology lingOnto, AccepterFactory factory)
           
protected  void printAsBlankNode(PrintWriter stream, SerializationState state, boolean first)
           
protected  boolean refers()
           
 boolean removeFormVariant(FormVariant formVariant, LexicalForm formVariantVal)
          Remove a variant of this form
 boolean removeRepresentation(Representation representation, Text representationVal)
          Remove an alternative representation of the form
 void setWrittenRep(Text writtenRep)
          Set the primary written representation of the form
 
Methods inherited from class eu.monnetproject.lemon.impl.LemonElementImpl
accept, acceptProperties, addAnnotation, addPredElem, addPredElemDirect, addProperty, addReference, addStrElem, addStrElemDirect, addType, addTypeDirect, defaultAccept, defaultAccept, defaultAccept, defaultMerge, doAccept, follow, getAnnotations, getAnnotations, getModelName, getPredElem, getPredElems, getProperty, getPropertys, getStrElem, getStrElems, getStrText, getTypes, isMultiReferenced, merge, merge, mergeIn, printAsBlankNode, printURI, removeAnnotation, removePredElem, removeProperty, removeReference, removeStrElem, removeType, resolveRemote, setStrElem, setStrElemDirect, setStrText, setStrTextDirect, updateAddPredElem, updateReference, visit, write
 
Methods inherited from class eu.monnetproject.lemon.URIElement
equals, getID, hashCode, toString
 
Methods inherited from class eu.monnetproject.lemon.URIValue
getInfHash, getURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface eu.monnetproject.lemon.model.LemonElement
addAnnotation, addProperty, addType, getAnnotations, getAnnotations, getID, getProperty, getPropertys, getTypes, removeAnnotation, removeProperty, removeType
 
Methods inherited from interface eu.monnetproject.lemon.model.LemonElementOrPredicate
getURI
 

Field Detail

reps

public HashMap<Representation,Collection<Text>> reps
Method Detail

getWrittenRep

public Text getWrittenRep()
Description copied from interface: LexicalForm
Get the primary written representation of the form

Specified by:
getWrittenRep in interface LexicalForm

setWrittenRep

public void setWrittenRep(Text writtenRep)
Description copied from interface: LexicalForm
Set the primary written representation of the form

Specified by:
setWrittenRep in interface LexicalForm

getRepresentations

public Map<Representation,Collection<Text>> getRepresentations()
Description copied from interface: LexicalForm
Get the alternative representations of the form

Specified by:
getRepresentations in interface LexicalForm

getRepresentation

public Collection<Text> getRepresentation(Representation representation)
Description copied from interface: LexicalForm
Get a particular set of representations of the form

Specified by:
getRepresentation in interface LexicalForm

addRepresentation

public boolean addRepresentation(Representation representation,
                                 Text representationVal)
Description copied from interface: LexicalForm
Add an alternative representation of the form

Specified by:
addRepresentation in interface LexicalForm

removeRepresentation

public boolean removeRepresentation(Representation representation,
                                    Text representationVal)
Description copied from interface: LexicalForm
Remove an alternative representation of the form

Specified by:
removeRepresentation in interface LexicalForm

getFormVariants

public Map<FormVariant,Collection<LexicalForm>> getFormVariants()
Description copied from interface: LexicalForm
Get any variants of this form

Specified by:
getFormVariants in interface LexicalForm

getFormVariant

public Collection<LexicalForm> getFormVariant(FormVariant formVariant)
Description copied from interface: LexicalForm
Get a particular variant set of this form

Specified by:
getFormVariant in interface LexicalForm

addFormVariant

public boolean addFormVariant(FormVariant formVariant,
                              LexicalForm formVariantVal)
Description copied from interface: LexicalForm
Add a variant of this form

Specified by:
addFormVariant in interface LexicalForm

removeFormVariant

public boolean removeFormVariant(FormVariant formVariant,
                                 LexicalForm formVariantVal)
Description copied from interface: LexicalForm
Remove a variant of this form

Specified by:
removeFormVariant in interface LexicalForm

refers

protected boolean refers()
Overrides:
refers in class LemonElementImpl

printAsBlankNode

protected void printAsBlankNode(PrintWriter stream,
                                SerializationState state,
                                boolean first)
Overrides:
printAsBlankNode in class LemonElementImpl

follow

protected boolean follow(LemonPredicate predicate)
Overrides:
follow in class LemonElementImpl

clearAll

public void clearAll()
Overrides:
clearAll in class LemonElementImpl

accept

public ReaderAccepter accept(URI pred,
                             URI value,
                             LinguisticOntology lingOnto,
                             AccepterFactory factory)
Specified by:
accept in interface ReaderAccepter

accept

public ReaderAccepter accept(URI pred,
                             String value,
                             LinguisticOntology lingOnto,
                             AccepterFactory factory)
Specified by:
accept in interface ReaderAccepter

accept

public void accept(URI pred,
                   String value,
                   String lang,
                   LinguisticOntology lingOnto,
                   AccepterFactory factory)
Specified by:
accept in interface ReaderAccepter

getElements

public Map<URI,Collection<Object>> getElements()
Specified by:
getElements in interface IntrospectableElement
Overrides:
getElements in class LemonElementImpl

merge

public void merge(ReaderAccepter accepter,
                  LinguisticOntology lingOnto,
                  AccepterFactory factory)
Specified by:
merge in interface ReaderAccepter


Copyright © 2012. All Rights Reserved.