|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.kmr.scam.editor.util.ValueObjectImpl
Wrapper for a fact in a value model.
Constructor Summary | |
ValueObjectImpl(RDFNode node,
Resource variable)
Constructor for the ValueObject object Objects from this constructor should only be used for static values, this since the RDFNode can not be updated. |
|
ValueObjectImpl(Statement statement,
Resource Variable)
Constructor for the ValueObject object |
|
ValueObjectImpl(String value,
String language,
Resource variable)
Deprecated. |
Method Summary | |
ValueObject |
duplicate()
Creates a (structural) duplicate of this object, all values are set to default. |
int |
getId()
Deprecated. |
String |
getLanguage()
Gets the literalLanguage attribute of the ValueObject object |
RDFNode |
getNode()
Gets the node attribute of the ValueObject object |
Property |
getPredicate()
|
Resource |
getResource()
Gets the resource attribute of the ValueObject object |
Resource |
getSubject()
Gets the subject attribute of the ValueObject object |
String |
getValue()
Gets the language attribute of the value, if such exists. |
boolean |
isDummy()
Tells wether a valueobject is empty, i.e. set to a dummy value. |
boolean |
isEdited()
|
int |
isOk()
OBS OBS OBS, THIS FUNCTION IS UNUSED AND I CAN'T FIGURE IT'S FUNCTION. |
boolean |
isValid()
|
void |
remove()
Removes the fact from the RDF-model |
void |
removeValueAndPossibleConstraints()
Removes the fact from the RDF-model by calling the remove() and
then all other constraints from the value-node in the case it is a
resource. |
void |
setEdited(boolean edited)
|
void |
setPredicate(Property newPredicate)
|
void |
setValid(boolean valid)
Used for validation of values in forms. |
void |
setValue(String value)
Sets the literal value of the fact. |
void |
setValue(String value,
String language)
Sets the value of the fact. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ValueObjectImpl(String value, String language, Resource variable)
value
- Description of the Parameterlanguage
- Description of the Parameterpublic ValueObjectImpl(Statement statement, Resource Variable)
statement
- the statement that represents the fact.public ValueObjectImpl(RDFNode node, Resource variable)
ValueObjct(Statement statement)
.
node
- the node that represents the fact.Method Detail |
public int getId()
public RDFNode getNode()
getNode
in interface ValueObject
public Resource getSubject()
getSubject
in interface ValueObject
public Resource getResource()
getResource
in interface ValueObject
public String getValue()
getValue
in interface ValueObject
public String getLanguage()
getLanguage
in interface ValueObject
public void setValue(String value) throws RDFException
setValue
in interface ValueObject
value
- The new value
RDFException
- thrown in case of exception while updating the
object.public void setValue(String value, String language) throws RDFException
Literal
the value will be set with a language attribute. (The language attribute
will only set if the language argument is non-null)Resource
will the
language argument have no effect.
setValue
in interface ValueObject
value
- The new valuelanguage
- The new language value
RDFException
- thrown if the value is null
, the
object represents a root node or in case of exception while updating
the data model.public void setPredicate(Property newPredicate) throws RDFException
setPredicate
in interface ValueObject
RDFException
public Property getPredicate() throws RDFException
getPredicate
in interface ValueObject
RDFException
public ValueObject duplicate() throws RDFException
ValueObject
that wraps facts in form of Statements
duplicate
in interface ValueObject
Statement
a
(structural)duplicate of this object, otherwise null.
RDFException
- thrown in case of exception while duplicating
the Statement
public void remove() throws RDFException
remove
in interface ValueObject
RDFException
- thrown in case of exception while removing fact
from the RDF-model.public void removeValueAndPossibleConstraints() throws RDFException
ValueObject
ValueObject.remove()
and
then all other constraints from the value-node in the case it is a
resource.
removeValueAndPossibleConstraints
in interface ValueObject
RDFException
- thrown in case of exception while removing fact
from the RDF-model.public String toString()
public void setEdited(boolean edited)
setEdited
in interface ValueObject
public void setValid(boolean valid)
ValueObject
setValid
in interface ValueObject
public boolean isEdited()
isEdited
in interface ValueObject
public boolean isValid()
isValid
in interface ValueObject
public int isOk()
ValueObject
isOk
in interface ValueObject
public boolean isDummy()
ValueObject
isDummy
in interface ValueObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |