eu.monnetproject.lemon.impl
Class LexicalSenseImpl

java.lang.Object
  extended by eu.monnetproject.lemon.URIValue
      extended by eu.monnetproject.lemon.URIElement
          extended by eu.monnetproject.lemon.impl.LemonElementImpl<LexicalSense>
              extended by eu.monnetproject.lemon.impl.LexicalSenseImpl
All Implemented Interfaces:
IntrospectableElement, ReaderAccepter, LemonElement, LemonElementOrPredicate, LexicalSense, Serializable

public class LexicalSenseImpl
extends LemonElementImpl<LexicalSense>
implements LexicalSense

Instantiated via LemonFactoryImpl

Author:
John McCrae
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface eu.monnetproject.lemon.model.LexicalSense
LexicalSense.ReferencePreference
 
Field Summary
 
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 addCondition(Condition predicate, SenseCondition condition)
          Add a condition to this sense
 boolean addContext(SenseContext context)
          Add a context to the sense
 boolean addDefinition(Definition predicate, SenseDefinition definition)
          Add a definition to this sense
 boolean addExample(Example example)
          Add an example to this sense
 boolean addIsA(Argument argument)
          Add an argument that is a member of the ontology predicate
 boolean addObjOfProp(Argument argument)
          Add an argument as the subject of the onotology predicate
 boolean addSenseRelation(SenseRelation senseRelation, LexicalSense senseRelationVal)
          Add a related sense
 boolean addSubjOfProp(Argument argument)
          Add an argument as the subject of the ontology predicate
 boolean addSubsense(LexicalSense sense)
          Add an atomic sense to the composition of this sense
protected  boolean follow(LemonPredicate predicate)
           
 Collection<SenseCondition> getCondition(Condition predicate)
          Get the set of conditions for a particular predicate on this sense
 Map<Condition,Collection<SenseCondition>> getConditions()
          Get the conditions on this sense
 Collection<SenseContext> getContexts()
          Get the contexts of the lexical sense
 Collection<SenseDefinition> getDefinition(Definition predicate)
          Get the definitions of this sense for a particular predicate
 Map<Definition,Collection<SenseDefinition>> getDefinitions()
          Get the definitions of this sense
 Map<URI,Collection<Object>> getElements()
           
 Collection<Example> getExamples()
          Get examples of this sense
 Collection<Argument> getIsAs()
          Get the arguments that are members of the ontology predicate
 LexicalEntry getIsSenseOf()
          Get the lexical entry this sense is attached to
 Collection<Argument> getObjOfProps()
          Get the arguments that are the object of the ontology predicate
 URI getReference()
          Get the URI of the referenced ontology entity
 LexicalSense.ReferencePreference getRefPref()
          Get the preference of the ontology entity for this sense's entry or null for no preference
 Collection<LexicalSense> getSenseRelation(SenseRelation senseRelation)
          Get the set of sense related by a particular predicate
 Map<SenseRelation,Collection<LexicalSense>> getSenseRelations()
          Get the relations to other sense
 Collection<Argument> getSubjOfProps()
          Get the arguments that are the subject of the ontology predicate
 Collection<LexicalSense> getSubsenses()
          Get the atomic senses that compose this sense, if any
 void merge(ReaderAccepter accepter, LinguisticOntology lingOnto, AccepterFactory factory)
           
protected  void printAsBlankNode(PrintWriter stream, SerializationState state, boolean first)
           
protected  boolean refers()
           
 boolean removeCondition(Condition predicate, SenseCondition condition)
          Remove a condition from this sense
 boolean removeContext(SenseContext context)
          Remove a context from the sense
 boolean removeDefinition(Definition predicate, SenseDefinition definition)
          Remove a definition from this sense
 boolean removeExample(Example example)
          Remove an example from this sense
 boolean removeIsA(Argument argument)
          Remove an argument this is a member of the ontology predicate
 boolean removeObjOfProp(Argument argument)
          Remove an argument as the subject of the ontology predicate
 boolean removeSenseRelation(SenseRelation senseRelation, LexicalSense senseRelationVal)
          Remove a related sense
 boolean removeSubjOfProp(Argument argument)
          Remove an argument as the subject of the ontology predicate
 boolean removeSubsense(LexicalSense sense)
          Remove all atomic senses from the composition of this sense
 void setIsSenseOf(LexicalEntry entry)
          Set the lexical entry this sense is attached to (avoid calling)
 void setReference(URI reference)
          Set the URI of the referenced ontology entity
 void setRefPref(LexicalSense.ReferencePreference refPref)
          Set the preference of the ontology entity for this sense's entry or null for no preference
 void write(PrintWriter stream, SerializationState state)
           
 
Methods inherited from class eu.monnetproject.lemon.impl.LemonElementImpl
accept, acceptProperties, addAnnotation, addPredElem, addPredElemDirect, addProperty, addReference, addStrElem, addStrElemDirect, addType, addTypeDirect, clearAll, 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
 
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
 

Method Detail

getReference

public URI getReference()
Description copied from interface: LexicalSense
Get the URI of the referenced ontology entity

Specified by:
getReference in interface LexicalSense

setReference

public void setReference(URI reference)
Description copied from interface: LexicalSense
Set the URI of the referenced ontology entity

Specified by:
setReference in interface LexicalSense

getRefPref

public LexicalSense.ReferencePreference getRefPref()
Description copied from interface: LexicalSense
Get the preference of the ontology entity for this sense's entry or null for no preference

Specified by:
getRefPref in interface LexicalSense

setRefPref

public void setRefPref(LexicalSense.ReferencePreference refPref)
Description copied from interface: LexicalSense
Set the preference of the ontology entity for this sense's entry or null for no preference

Specified by:
setRefPref in interface LexicalSense

addContext

public boolean addContext(SenseContext context)
Description copied from interface: LexicalSense
Add a context to the sense

Specified by:
addContext in interface LexicalSense

removeContext

public boolean removeContext(SenseContext context)
Description copied from interface: LexicalSense
Remove a context from the sense

Specified by:
removeContext in interface LexicalSense

getContexts

public Collection<SenseContext> getContexts()
Description copied from interface: LexicalSense
Get the contexts of the lexical sense

Specified by:
getContexts in interface LexicalSense

getConditions

public Map<Condition,Collection<SenseCondition>> getConditions()
Description copied from interface: LexicalSense
Get the conditions on this sense

Specified by:
getConditions in interface LexicalSense

getCondition

public Collection<SenseCondition> getCondition(Condition predicate)
Description copied from interface: LexicalSense
Get the set of conditions for a particular predicate on this sense

Specified by:
getCondition in interface LexicalSense

addCondition

public boolean addCondition(Condition predicate,
                            SenseCondition condition)
Description copied from interface: LexicalSense
Add a condition to this sense

Specified by:
addCondition in interface LexicalSense

removeCondition

public boolean removeCondition(Condition predicate,
                               SenseCondition condition)
Description copied from interface: LexicalSense
Remove a condition from this sense

Specified by:
removeCondition in interface LexicalSense

getExamples

public Collection<Example> getExamples()
Description copied from interface: LexicalSense
Get examples of this sense

Specified by:
getExamples in interface LexicalSense

addExample

public boolean addExample(Example example)
Description copied from interface: LexicalSense
Add an example to this sense

Specified by:
addExample in interface LexicalSense

removeExample

public boolean removeExample(Example example)
Description copied from interface: LexicalSense
Remove an example from this sense

Specified by:
removeExample in interface LexicalSense

getDefinitions

public Map<Definition,Collection<SenseDefinition>> getDefinitions()
Description copied from interface: LexicalSense
Get the definitions of this sense

Specified by:
getDefinitions in interface LexicalSense

getDefinition

public Collection<SenseDefinition> getDefinition(Definition predicate)
Description copied from interface: LexicalSense
Get the definitions of this sense for a particular predicate

Specified by:
getDefinition in interface LexicalSense

addDefinition

public boolean addDefinition(Definition predicate,
                             SenseDefinition definition)
Description copied from interface: LexicalSense
Add a definition to this sense

Specified by:
addDefinition in interface LexicalSense

removeDefinition

public boolean removeDefinition(Definition predicate,
                                SenseDefinition definition)
Description copied from interface: LexicalSense
Remove a definition from this sense

Specified by:
removeDefinition in interface LexicalSense

getSubjOfProps

public Collection<Argument> getSubjOfProps()
Description copied from interface: LexicalSense
Get the arguments that are the subject of the ontology predicate

Specified by:
getSubjOfProps in interface LexicalSense

addSubjOfProp

public boolean addSubjOfProp(Argument argument)
Description copied from interface: LexicalSense
Add an argument as the subject of the ontology predicate

Specified by:
addSubjOfProp in interface LexicalSense

removeSubjOfProp

public boolean removeSubjOfProp(Argument argument)
Description copied from interface: LexicalSense
Remove an argument as the subject of the ontology predicate

Specified by:
removeSubjOfProp in interface LexicalSense

getObjOfProps

public Collection<Argument> getObjOfProps()
Description copied from interface: LexicalSense
Get the arguments that are the object of the ontology predicate

Specified by:
getObjOfProps in interface LexicalSense

addObjOfProp

public boolean addObjOfProp(Argument argument)
Description copied from interface: LexicalSense
Add an argument as the subject of the onotology predicate

Specified by:
addObjOfProp in interface LexicalSense

removeObjOfProp

public boolean removeObjOfProp(Argument argument)
Description copied from interface: LexicalSense
Remove an argument as the subject of the ontology predicate

Specified by:
removeObjOfProp in interface LexicalSense

getIsAs

public Collection<Argument> getIsAs()
Description copied from interface: LexicalSense
Get the arguments that are members of the ontology predicate

Specified by:
getIsAs in interface LexicalSense

addIsA

public boolean addIsA(Argument argument)
Description copied from interface: LexicalSense
Add an argument that is a member of the ontology predicate

Specified by:
addIsA in interface LexicalSense

removeIsA

public boolean removeIsA(Argument argument)
Description copied from interface: LexicalSense
Remove an argument this is a member of the ontology predicate

Specified by:
removeIsA in interface LexicalSense

getSubsenses

public Collection<LexicalSense> getSubsenses()
Description copied from interface: LexicalSense
Get the atomic senses that compose this sense, if any

Specified by:
getSubsenses in interface LexicalSense

addSubsense

public boolean addSubsense(LexicalSense sense)
Description copied from interface: LexicalSense
Add an atomic sense to the composition of this sense

Specified by:
addSubsense in interface LexicalSense

removeSubsense

public boolean removeSubsense(LexicalSense sense)
Description copied from interface: LexicalSense
Remove all atomic senses from the composition of this sense

Specified by:
removeSubsense in interface LexicalSense

getSenseRelations

public Map<SenseRelation,Collection<LexicalSense>> getSenseRelations()
Description copied from interface: LexicalSense
Get the relations to other sense

Specified by:
getSenseRelations in interface LexicalSense

getSenseRelation

public Collection<LexicalSense> getSenseRelation(SenseRelation senseRelation)
Description copied from interface: LexicalSense
Get the set of sense related by a particular predicate

Specified by:
getSenseRelation in interface LexicalSense

addSenseRelation

public boolean addSenseRelation(SenseRelation senseRelation,
                                LexicalSense senseRelationVal)
Description copied from interface: LexicalSense
Add a related sense

Specified by:
addSenseRelation in interface LexicalSense

removeSenseRelation

public boolean removeSenseRelation(SenseRelation senseRelation,
                                   LexicalSense senseRelationVal)
Description copied from interface: LexicalSense
Remove a related sense

Specified by:
removeSenseRelation in interface LexicalSense

getIsSenseOf

public LexicalEntry getIsSenseOf()
Description copied from interface: LexicalSense
Get the lexical entry this sense is attached to

Specified by:
getIsSenseOf in interface LexicalSense

setIsSenseOf

public void setIsSenseOf(LexicalEntry entry)
Description copied from interface: LexicalSense
Set the lexical entry this sense is attached to (avoid calling)

Specified by:
setIsSenseOf in interface LexicalSense

refers

protected boolean refers()
Overrides:
refers in class LemonElementImpl<LexicalSense>

printAsBlankNode

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

write

public void write(PrintWriter stream,
                  SerializationState state)
Overrides:
write in class LemonElementImpl<LexicalSense>

follow

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

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

merge

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

getElements

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


Copyright © 2012. All Rights Reserved.