eu.monnetproject.lemon.model
Interface LemonElement

All Superinterfaces:
LemonElementOrPredicate
All Known Subinterfaces:
Argument, Component, Constituent, Example, Frame, LexicalEntry, LexicalForm, LexicalSense, LexicalTopic, Lexicon, MorphPattern, MorphTransform, Node, Part, Phrase, PhraseTerminal, PropertyValue, Prototype, SenseCondition, SenseContext, SenseDefinition, SyntacticRoleMarker, Word
All Known Implementing Classes:
ArgumentImpl, ComponentImpl, ConditionImpl, ConstituentImpl, ContextImpl, DefinitionImpl, ExampleImpl, FormImpl, FrameImpl, LemonElementImpl, LexicalEntryImpl, LexicalSenseImpl, LexiconImpl, MorphPatternImpl, MorphTransformImpl, NodeImpl, PartImpl, PhraseImpl, PrototypeImpl, TopicImpl, URIElement, VirtualForm, WordImpl

public interface LemonElement
extends LemonElementOrPredicate

The super-class for all lemon elements (individuals)

Author:
John McCrae

Method Summary
 boolean addAnnotation(URI annotationProperty, Object annotation)
          Add an annotation to this element
 boolean addProperty(Property property, PropertyValue propertyVal)
          Add a property to this element
 void addType(URI uri)
          Add a type to this element
 Map<URI,Collection<Object>> getAnnotations()
          Get any annotations for this element
 Collection<Object> getAnnotations(URI annotation)
          Get the set of annotations for this property
 String getID()
          Get the blank node ID for this node or null if this is a named node
 Collection<PropertyValue> getProperty(Property property)
          Get the set of values for a property
 Map<Property,Collection<PropertyValue>> getPropertys()
          Get any properties of this element
 Collection<URI> getTypes()
          Get any types of the element
 boolean removeAnnotation(URI annotationProperty, Object annotation)
          Remove an annotation from this element
 boolean removeProperty(Property property, PropertyValue propertyVal)
          Remove a property from this element
 void removeType(URI uri)
          Remove a type from this element
 
Methods inherited from interface eu.monnetproject.lemon.model.LemonElementOrPredicate
getURI
 

Method Detail

getPropertys

Map<Property,Collection<PropertyValue>> getPropertys()
Get any properties of this element


getProperty

Collection<PropertyValue> getProperty(Property property)
Get the set of values for a property


addProperty

boolean addProperty(Property property,
                    PropertyValue propertyVal)
Add a property to this element


removeProperty

boolean removeProperty(Property property,
                       PropertyValue propertyVal)
Remove a property from this element


getID

String getID()
Get the blank node ID for this node or null if this is a named node


getTypes

Collection<URI> getTypes()
Get any types of the element


addType

void addType(URI uri)
Add a type to this element


removeType

void removeType(URI uri)
Remove a type from this element


getAnnotations

Map<URI,Collection<Object>> getAnnotations()
Get any annotations for this element

Returns:
A map where the value is a collection of either java.net.URI, java.lang.String (blank nodes) or eu.monnetproject.lemon.model.Text

getAnnotations

Collection<Object> getAnnotations(URI annotation)
Get the set of annotations for this property

Returns:
A collection of either java.net.URI, java.lang.String (blank nodes) or eu.monnetproject.lemon.model.Text

addAnnotation

boolean addAnnotation(URI annotationProperty,
                      Object annotation)
Add an annotation to this element

Parameters:
annotationProperty - The annotation property
annotation - Either a java.net.URI, java.lang.String (blank nodes) or eu.monnetproject.lemon.model.Text
Returns:
true if the element changed
Throws:
IllegalArgumentException - If the annotation is not of the appropriate type

removeAnnotation

boolean removeAnnotation(URI annotationProperty,
                         Object annotation)
Remove an annotation from this element

Parameters:
annotationProperty - The annotation property
annotation - Either a java.net.URI, java.lang.String (blank nodes) or eu.monnetproject.lemon.model.Text
Returns:
true if the element changed
Throws:
IllegalArgumentException - If the annotation is not of the appropriate type


Copyright © 2012. All Rights Reserved.