|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eu.monnetproject.lemon.URIValue eu.monnetproject.lemon.URIElement eu.monnetproject.lemon.impl.LemonElementImpl<Elem>
public abstract class LemonElementImpl<Elem extends LemonElement>
Base class for element implementations
Field Summary | |
---|---|
protected boolean |
checkRemote
|
protected LemonModelImpl |
model
|
static URI |
RDF_TYPE
|
protected List<LemonElementImpl<?>> |
referencers
|
Constructor Summary | |
---|---|
protected |
LemonElementImpl(String id,
String type,
LemonModelImpl model)
|
protected |
LemonElementImpl(URI uri,
String type,
LemonModelImpl model)
|
Method Summary | ||
---|---|---|
void |
accept(ElementVisitor visitor)
|
|
protected boolean |
acceptProperties(URI pred,
URI value,
LinguisticOntology lingOnto)
|
|
boolean |
addAnnotation(URI uri,
Object o)
Add an annotation to this element |
|
protected boolean |
addPredElem(LemonPredicate p,
LemonElement e)
|
|
protected boolean |
addPredElemDirect(LemonPredicate p,
LemonElement e)
|
|
boolean |
addProperty(Property property,
PropertyValue propertyVal)
Add a property to this element |
|
protected void |
addReference(LemonElementImpl<?> element)
|
|
protected boolean |
addStrElem(String p,
LemonElement e)
|
|
protected boolean |
addStrElemDirect(String p,
LemonElement e)
|
|
void |
addType(URI uri)
Add a type to this element |
|
protected void |
addTypeDirect(URI uri)
|
|
void |
clearAll()
|
|
protected ReaderAccepter |
defaultAccept(URI pred,
String value)
|
|
protected void |
defaultAccept(URI pred,
String val,
String lang)
|
|
protected ReaderAccepter |
defaultAccept(URI pred,
URI value,
LinguisticOntology lingOnto)
|
|
protected void |
defaultMerge(ReaderAccepter accepter,
LinguisticOntology lingOnto,
AccepterFactory factory)
|
|
protected void |
doAccept(ElementVisitor visitor)
|
|
protected boolean |
follow(LemonPredicate predicate)
|
|
protected boolean |
follow(String predName)
|
|
Map<URI,Collection<Object>> |
getAnnotations()
Get any annotations for this element |
|
Collection<Object> |
getAnnotations(URI uri)
Get the set of annotations for this property |
|
Map<URI,Collection<Object>> |
getElements()
|
|
String |
getModelName()
|
|
protected Collection<LemonElement> |
getPredElem(LemonPredicate p)
|
|
protected
|
getPredElems(Class<Pred> clazz)
|
|
Collection<PropertyValue> |
getProperty(Property property)
Get the set of values for a property |
|
Map<Property,Collection<PropertyValue>> |
getPropertys()
Get any properties of this element |
|
protected LemonElement |
getStrElem(String name)
|
|
protected Collection<LemonElement> |
getStrElems(String name)
|
|
protected Text |
getStrText(String name)
|
|
Collection<URI> |
getTypes()
Get any types of the element |
|
boolean |
isMultiReferenced()
|
|
protected
|
merge(Collection<X> list1,
Collection<X> list2)
|
|
protected
|
merge(Map<X,Collection<Y>> map1,
Map<X,Collection<Y>> map2)
|
|
protected void |
mergeIn(Elem elem)
|
|
protected void |
printAsBlankNode(PrintWriter stream,
SerializationState state)
|
|
protected void |
printAsBlankNode(PrintWriter stream,
SerializationState state,
boolean first)
|
|
protected void |
printURI(URI uri,
PrintWriter stream)
|
|
protected boolean |
refers()
|
|
boolean |
removeAnnotation(URI uri,
Object o)
Remove an annotation from this element |
|
protected boolean |
removePredElem(LemonPredicate p,
LemonElement e)
|
|
boolean |
removeProperty(Property property,
PropertyValue propertyVal)
Remove a property from this element |
|
protected void |
removeReference(LemonElementImpl<?> element)
|
|
protected boolean |
removeStrElem(String p,
LemonElement e)
|
|
void |
removeType(URI uri)
Remove a type from this element |
|
protected void |
resolveRemote()
|
|
protected void |
setStrElem(String name,
LemonElement elem)
|
|
protected void |
setStrElemDirect(String name,
LemonElement elem)
|
|
protected void |
setStrText(String name,
Text txt)
|
|
protected void |
setStrTextDirect(String name,
Text txt)
|
|
protected void |
updateAddPredElem(LemonElement e,
LemonPredicate p)
|
|
protected void |
updateReference(LemonElement from,
LemonElement to)
|
|
void |
visit(PrintWriter stream,
SerializationState state)
|
|
void |
write(PrintWriter stream,
SerializationState state)
|
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 |
---|
getID |
Methods inherited from interface eu.monnetproject.lemon.model.LemonElementOrPredicate |
---|
getURI |
Methods inherited from interface eu.monnetproject.lemon.impl.io.ReaderAccepter |
---|
accept, accept, accept, merge |
Field Detail |
---|
public static final URI RDF_TYPE
protected List<LemonElementImpl<?>> referencers
protected final LemonModelImpl model
protected boolean checkRemote
Constructor Detail |
---|
protected LemonElementImpl(URI uri, String type, LemonModelImpl model)
protected LemonElementImpl(String id, String type, LemonModelImpl model)
Method Detail |
---|
public Map<Property,Collection<PropertyValue>> getPropertys()
LemonElement
getPropertys
in interface LemonElement
getPropertys
in class URIElement
public Collection<PropertyValue> getProperty(Property property)
LemonElement
getProperty
in interface LemonElement
getProperty
in class URIElement
public boolean addProperty(Property property, PropertyValue propertyVal)
LemonElement
addProperty
in interface LemonElement
addProperty
in class URIElement
public boolean removeProperty(Property property, PropertyValue propertyVal)
LemonElement
removeProperty
in interface LemonElement
removeProperty
in class URIElement
public Collection<URI> getTypes()
LemonElement
getTypes
in interface LemonElement
getTypes
in class URIElement
public void addType(URI uri)
LemonElement
addType
in interface LemonElement
addType
in class URIElement
protected boolean addStrElemDirect(String p, LemonElement e)
protected void addTypeDirect(URI uri)
public void removeType(URI uri)
LemonElement
removeType
in interface LemonElement
removeType
in class URIElement
public Map<URI,Collection<Object>> getAnnotations()
LemonElement
getAnnotations
in interface LemonElement
getAnnotations
in class URIElement
public Collection<Object> getAnnotations(URI uri)
LemonElement
getAnnotations
in interface LemonElement
getAnnotations
in class URIElement
public boolean addAnnotation(URI uri, Object o)
LemonElement
addAnnotation
in interface LemonElement
addAnnotation
in class URIElement
uri
- The annotation propertyo
- Either a java.net.URI, java.lang.String (blank nodes) or eu.monnetproject.lemon.model.Text
public boolean removeAnnotation(URI uri, Object o)
LemonElement
removeAnnotation
in interface LemonElement
removeAnnotation
in class URIElement
uri
- The annotation propertyo
- Either a java.net.URI, java.lang.String (blank nodes) or eu.monnetproject.lemon.model.Text
protected LemonElement getStrElem(String name)
protected void setStrElemDirect(String name, LemonElement elem)
protected void setStrElem(String name, LemonElement elem)
protected Text getStrText(String name)
protected void setStrText(String name, Text txt)
protected void setStrTextDirect(String name, Text txt)
protected <Pred extends LemonPredicate> Map<Pred,Collection<LemonElement>> getPredElems(Class<Pred> clazz)
protected Collection<LemonElement> getPredElem(LemonPredicate p)
protected boolean addPredElem(LemonPredicate p, LemonElement e)
protected boolean addPredElemDirect(LemonPredicate p, LemonElement e)
protected void updateAddPredElem(LemonElement e, LemonPredicate p)
protected boolean removePredElem(LemonPredicate p, LemonElement e)
protected Collection<LemonElement> getStrElems(String name)
protected boolean addStrElem(String p, LemonElement e)
protected boolean removeStrElem(String p, LemonElement e)
protected void addReference(LemonElementImpl<?> element)
protected void removeReference(LemonElementImpl<?> element)
protected void updateReference(LemonElement from, LemonElement to)
protected void mergeIn(Elem elem)
protected boolean refers()
public void visit(PrintWriter stream, SerializationState state)
protected void printAsBlankNode(PrintWriter stream, SerializationState state)
protected void printURI(URI uri, PrintWriter stream)
protected void printAsBlankNode(PrintWriter stream, SerializationState state, boolean first)
public void write(PrintWriter stream, SerializationState state)
protected boolean follow(LemonPredicate predicate)
protected boolean follow(String predName)
protected void doAccept(ElementVisitor visitor)
public final void accept(ElementVisitor visitor)
public void clearAll()
protected ReaderAccepter defaultAccept(URI pred, URI value, LinguisticOntology lingOnto)
protected ReaderAccepter defaultAccept(URI pred, String value)
protected void defaultAccept(URI pred, String val, String lang)
protected <X,Y> void merge(Map<X,Collection<Y>> map1, Map<X,Collection<Y>> map2)
protected <X> void merge(Collection<X> list1, Collection<X> list2)
protected void defaultMerge(ReaderAccepter accepter, LinguisticOntology lingOnto, AccepterFactory factory)
protected boolean acceptProperties(URI pred, URI value, LinguisticOntology lingOnto)
public Map<URI,Collection<Object>> getElements()
getElements
in interface IntrospectableElement
public String getModelName()
getModelName
in interface IntrospectableElement
public boolean isMultiReferenced()
protected void resolveRemote()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |