eu.monnetproject.lemon
Class URIElement

java.lang.Object
  extended by eu.monnetproject.lemon.URIValue
      extended by eu.monnetproject.lemon.URIElement
All Implemented Interfaces:
LemonElement, LemonElementOrPredicate
Direct Known Subclasses:
LemonElementImpl

public abstract class URIElement
extends URIValue
implements LemonElement

Super-class for creating lemon elements. This is extended in the context of linguistic ontologies


Constructor Summary
protected URIElement(String id)
           
protected URIElement(URI uri)
           
 
Method Summary
 boolean addAnnotation(URI annotationProperty, Object annotation)
          Add an annotation to this element
 boolean addProperty(Property prop, PropertyValue propVal)
          Add a property to this element
 void addType(URI uri)
          Add a type to this element
 boolean equals(Object obj)
           
 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 prop)
          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
 int hashCode()
           
 boolean removeAnnotation(URI annotationProperty, Object annotation)
          Remove an annotation from this element
 boolean removeProperty(Property prop, PropertyValue propVal)
          Remove a property from this element
 void removeType(URI uri)
          Remove a type from this element
 String 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.LemonElementOrPredicate
getURI
 

Constructor Detail

URIElement

protected URIElement(URI uri)

URIElement

protected URIElement(String id)
Method Detail

getPropertys

public Map<Property,Collection<PropertyValue>> getPropertys()
Description copied from interface: LemonElement
Get any properties of this element

Specified by:
getPropertys in interface LemonElement

getProperty

public Collection<PropertyValue> getProperty(Property prop)
Description copied from interface: LemonElement
Get the set of values for a property

Specified by:
getProperty in interface LemonElement

addProperty

public boolean addProperty(Property prop,
                           PropertyValue propVal)
Description copied from interface: LemonElement
Add a property to this element

Specified by:
addProperty in interface LemonElement

removeProperty

public boolean removeProperty(Property prop,
                              PropertyValue propVal)
Description copied from interface: LemonElement
Remove a property from this element

Specified by:
removeProperty in interface LemonElement

getID

public String getID()
Description copied from interface: LemonElement
Get the blank node ID for this node or null if this is a named node

Specified by:
getID in interface LemonElement

getTypes

public Collection<URI> getTypes()
Description copied from interface: LemonElement
Get any types of the element

Specified by:
getTypes in interface LemonElement

addType

public void addType(URI uri)
Description copied from interface: LemonElement
Add a type to this element

Specified by:
addType in interface LemonElement

removeType

public void removeType(URI uri)
Description copied from interface: LemonElement
Remove a type from this element

Specified by:
removeType in interface LemonElement

equals

public boolean equals(Object obj)
Overrides:
equals in class URIValue

hashCode

public int hashCode()
Overrides:
hashCode in class URIValue

toString

public String toString()
Overrides:
toString in class URIValue

getAnnotations

public Map<URI,Collection<Object>> getAnnotations()
Description copied from interface: LemonElement
Get any annotations for this element

Specified by:
getAnnotations in interface LemonElement
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

public Collection<Object> getAnnotations(URI annotation)
Description copied from interface: LemonElement
Get the set of annotations for this property

Specified by:
getAnnotations in interface LemonElement
Returns:
A collection of either java.net.URI, java.lang.String (blank nodes) or eu.monnetproject.lemon.model.Text

addAnnotation

public boolean addAnnotation(URI annotationProperty,
                             Object annotation)
Description copied from interface: LemonElement
Add an annotation to this element

Specified by:
addAnnotation in interface LemonElement
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

removeAnnotation

public boolean removeAnnotation(URI annotationProperty,
                                Object annotation)
Description copied from interface: LemonElement
Remove an annotation from this element

Specified by:
removeAnnotation in interface LemonElement
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


Copyright © 2012. All Rights Reserved.