|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.creole.ontology.OntologyResourceImpl
public class OntologyResourceImpl
This is an implementation for ontology resource. It provides implementations
for the methods on the OntologyResource
interface and is intended to be used as a base class for other classes
implementing that interface or its sub-interfaces.
Field Summary | |
---|---|
protected String |
comment
|
protected HashMap |
instanceProperties
|
protected String |
name
|
protected Ontology |
ontology
|
protected Taxonomy |
taxonomy
|
protected String |
uri
|
Constructor Summary | |
---|---|
OntologyResourceImpl(String uri,
String name,
String comment,
Taxonomy taxonomy)
|
|
OntologyResourceImpl(String name,
String comment,
Taxonomy taxonomy)
Constructor variant using the name as the local URI. |
Method Summary | |
---|---|
boolean |
addPropertyValue(String propertyName,
Object theValue)
Adds a new property with the given name and value. |
String |
getComment()
Gets the comment of the resource. |
String |
getName()
Gets resource name. |
Ontology |
getOntology()
Gets the ontology to which the resource belongs. |
Object |
getPropertyValue(String propertyName)
|
List |
getPropertyValues(String propertyName)
Gets the list of values for a given property name. |
Set |
getSetPropertiesNames()
Gets the names of the properties that have set values for this instance. |
Taxonomy |
getTaxonomy()
Gets the taxonomy to which the resource belongs. |
String |
getURI()
Gets the URI of the resource. |
boolean |
removePropertyValue(String propertyName,
Object theValue)
Removes one of the values for a given property. |
void |
removePropertyValues(String propertyName)
Removes all values for a named property. |
void |
setComment(String comment)
Sets the resource comment. |
void |
setName(String name)
Sets the resource name. |
void |
setOntology(Taxonomy ontology)
|
void |
setURI(String uri)
Sets the URI of the resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String uri
protected String comment
protected String name
protected Taxonomy taxonomy
protected Ontology ontology
protected HashMap instanceProperties
Constructor Detail |
---|
public OntologyResourceImpl(String uri, String name, String comment, Taxonomy taxonomy)
public OntologyResourceImpl(String name, String comment, Taxonomy taxonomy)
name
- comment
- ontology
- Method Detail |
---|
public boolean addPropertyValue(String propertyName, Object theValue)
OntologyResource
addPropertyValue
in interface OntologyResource
propertyName
- the name of the propertytheValue
- the value for the property
public Set getSetPropertiesNames()
OntologyResource
getSetPropertiesNames
in interface OntologyResource
public List getPropertyValues(String propertyName)
OntologyResource
getPropertyValues
in interface OntologyResource
propertyName
- the name of the property
public boolean removePropertyValue(String propertyName, Object theValue)
OntologyResource
removePropertyValue
in interface OntologyResource
propertyName
- the name of the propertytheValue
- the value to be removed.
public void removePropertyValues(String propertyName)
OntologyResource
removePropertyValues
in interface OntologyResource
propertyName
- the property name.public Object getPropertyValue(String propertyName)
public String getComment()
OntologyResource
getComment
in interface OntologyResource
public void setComment(String comment)
OntologyResource
setComment
in interface OntologyResource
comment
- The comment to set.public String getName()
OntologyResource
getName
in interface OntologyResource
public void setName(String name)
OntologyResource
setName
in interface OntologyResource
name
- The name to set.public Taxonomy getTaxonomy()
OntologyResource
getTaxonomy
in interface OntologyResource
public Ontology getOntology()
OntologyResource
getOntology
in interface OntologyResource
public void setOntology(Taxonomy ontology)
ontology
- The ontology to set.public String getURI()
OntologyResource
getURI
in interface OntologyResource
public void setURI(String uri)
OntologyResource
setURI
in interface OntologyResource
uri
- The URI to set.
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |