eu.monnetproject.lemon.liam.impl
Class VirtualForm

java.lang.Object
  extended by eu.monnetproject.lemon.liam.impl.VirtualForm
All Implemented Interfaces:
LemonElement, LemonElementOrPredicate, LexicalForm

public class VirtualForm
extends Object
implements LexicalForm

Author:
John McCrae

Constructor Summary
VirtualForm()
           
 
Method Summary
 boolean addAnnotation(URI uri, Object o)
          Add an annotation to this element
 boolean addFormVariant(FormVariant fv, LexicalForm lf)
          Add a variant of this form
 boolean addProperty(Property prprt, PropertyValue pv)
          Add a property to this element
 boolean addRepresentation(Representation r, Text text)
          Add an alternative representation of the form
 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 uri)
          Get the set of annotations for this property
 Collection<LexicalForm> getFormVariant(FormVariant fv)
          Get a particular variant set of this form
 Map<FormVariant,Collection<LexicalForm>> getFormVariants()
          Get any variants of this form
 String getID()
          Get the blank node ID for this node or null if this is a named node
 Collection<PropertyValue> getProperty(Property prprt)
          Get the set of values for a property
 Map<Property,Collection<PropertyValue>> getPropertys()
          Get any properties of this element
 Collection<Text> getRepresentation(Representation r)
          Get a particular set of representations of the form
 Map<Representation,Collection<Text>> getRepresentations()
          Get the alternative representations of the form
 Collection<URI> getTypes()
          Get any types of the element
 URI getURI()
          The URI for this element or null if the element is a blank node
 Text getWrittenRep()
          Get the primary written representation of the form
 boolean removeAnnotation(URI uri, Object o)
          Remove an annotation from this element
 boolean removeFormVariant(FormVariant fv, LexicalForm lf)
          Remove a variant of this form
 boolean removeProperty(Property prprt, PropertyValue pv)
          Remove a property from this element
 boolean removeRepresentation(Representation r, Text text)
          Remove an alternative representation of the form
 void removeType(URI uri)
          Remove a type from this element
 void setWrittenRep(Text text)
          Set the primary written representation of the form
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualForm

public VirtualForm()
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 text)
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 r)
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 r,
                                 Text text)
Description copied from interface: LexicalForm
Add an alternative representation of the form

Specified by:
addRepresentation in interface LexicalForm

removeRepresentation

public boolean removeRepresentation(Representation r,
                                    Text text)
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 fv)
Description copied from interface: LexicalForm
Get a particular variant set of this form

Specified by:
getFormVariant in interface LexicalForm

addFormVariant

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

Specified by:
addFormVariant in interface LexicalForm

removeFormVariant

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

Specified by:
removeFormVariant in interface LexicalForm

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 prprt)
Description copied from interface: LemonElement
Get the set of values for a property

Specified by:
getProperty in interface LemonElement

addProperty

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

Specified by:
addProperty in interface LemonElement

removeProperty

public boolean removeProperty(Property prprt,
                              PropertyValue pv)
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

getURI

public URI getURI()
Description copied from interface: LemonElementOrPredicate
The URI for this element or null if the element is a blank node

Specified by:
getURI in interface LemonElementOrPredicate

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 uri)
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 uri,
                             Object o)
Description copied from interface: LemonElement
Add an annotation to this element

Specified by:
addAnnotation in interface LemonElement
Parameters:
uri - The annotation property
o - 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 uri,
                                Object o)
Description copied from interface: LemonElement
Remove an annotation from this element

Specified by:
removeAnnotation in interface LemonElement
Parameters:
uri - The annotation property
o - 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.