Interface TypedValue
-
public interface TypedValueInterface for a PROV value.
PROV-DM Definition for Value: A value is a constant such as a string, number, time, qualified name, IRI, and encoded binary data, whose interpretation is outside the scope of PROV. Values can occur in attribute-value pairs.
In the Java implementation, a TypedValue can be seen as an object with two properties: a
valueand atype.The
typeis expressed as a QualifiedName, whereas thevalueis normally expected to be a string. (Two notable exceptions are qualified names whose external representation is dependent on the choice of prefix, and langString which also have a language property.Relevant Factory Methods:
-
ProvFactory.newKey(Object, QualifiedName) -
ProvFactory.newLocation(Object, QualifiedName) -
ProvFactory.newOther(QualifiedName, Object, QualifiedName) -
ProvFactory.newRole(Object, QualifiedName) -
ProvFactory.newType(Object, QualifiedName) -
ProvFactory.newValue(Object, QualifiedName)
Schema Definition:
The following schema fragment specifies the expected content contained within this class.
<complexType name="Location"> <simpleContent> <extension base="<http://www.w3.org/2001/XMLSchema>anySimpleType"> <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}QName" /> </extension> </simpleContent> </complexType>- See Also:
- PROV-DM Value, PROV-N Literal, PROV-XML Value, PROV-JSON Data Typing
-
-
-
Method Summary
Modifier and Type Method Description ObjectconvertValueToObject(ValueConverter vconv)Converts the value associated with thevalueproperty into a Java object.ObjectgetConvertedValue()Returns the cached converted value for thevalueproperty .QualifiedNamegetType()Gets the type, expressed as aQualifiedNameObjectgetValue()Gets the value of the value property.voidsetType(QualifiedName value)Sets the value of thetypeproperty.voidsetValue(String value)Sets thevalueproperty.voidsetValue(LangString value)Sets thevalueproperty.voidsetValue(QualifiedName value)Sets thevalueproperty.voidsetValueFromObject(Object value)Sets the value of thevalueproperty.
-
-
-
Method Detail
-
convertValueToObject
Object convertValueToObject(ValueConverter vconv)
Converts the value associated with thevalueproperty into a Java object.- Returns:
- possible object is
Object
-
getType
QualifiedName getType()
Gets the type, expressed as aQualifiedName- Returns:
- possible object is
QualifiedName
-
getValue
Object getValue()
Gets the value of the value property.- Returns:
- possible object of
String,QualifiedName,LangString
-
getConvertedValue
Object getConvertedValue()
Returns the cached converted value for thevalueproperty .- Returns:
- possible object is
Object
-
setType
void setType(QualifiedName value)
Sets the value of thetypeproperty.- Parameters:
value- allowed object isQualifiedName
-
setValue
void setValue(LangString value)
Sets thevalueproperty.- Parameters:
value- allowed object isLangString
-
setValue
void setValue(QualifiedName value)
Sets thevalueproperty.- Parameters:
value- allowed object isQualifiedName
-
setValue
void setValue(String value)
Sets thevalueproperty.- Parameters:
value- allowed object isString
-
-