|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Service
This is the 'simple' interface to a DDR service, via which you retrieve properties of the delivery context based on available (HTTP) evidence.
Field Summary | |
---|---|
static java.lang.String |
NOT_SUPPORTED
This constant value is used to indicate that a feature is not supported, when returned by a String method. |
Method Summary | |
---|---|
java.lang.String |
getDataVersion()
An informative implementation-specific method to indicate the revision level of the underlying data, if known. |
java.lang.String |
getImplementationVersion()
A informative implementation-specific method to determine the version of the implementation of the API. |
PropertyValue |
getPropertyValue(Evidence evidence,
PropertyName propertyName)
Use the evidence provided to get the PropertyValue of the property named by the propertyName in the vocabulary given by the propertyName and in the default aspect of the property according to the property's vocabulary. |
PropertyValue |
getPropertyValue(Evidence evidence,
PropertyRef propertyRef)
Use the evidence provided to get the PropertyValue of the property named by the propertyRef, in the property vocabulary given by the propertyRef and in the aspect also given by the propertyRef. |
PropertyValue |
getPropertyValue(Evidence evidence,
java.lang.String localPropertyName)
Use the evidence provided to get the value of the property named by the localPropertyName, which is a term in the default property vocabulary defined during initialization and in the default aspect for the property as defined in the default property vocabulary. |
PropertyValue |
getPropertyValue(Evidence evidence,
java.lang.String localPropertyName,
java.lang.String localAspectName,
java.lang.String vocabularyIRI)
Use the evidence provided to get the value of the property named by the localPropertyName, which is a term in the given vocabulary of properties identified by a namespace IRI and in the given aspect for the property. |
PropertyValues |
getPropertyValues(Evidence evidence)
Use the evidence provided to get all of the available values of properties in the default property vocabulary. |
PropertyValues |
getPropertyValues(Evidence evidence,
PropertyRef[] propertyRefs)
Use the evidence provided to get the value of each property in the array of PropertyRef instances. |
PropertyValues |
getPropertyValues(Evidence evidence,
java.lang.String localAspectName)
Use the evidence provided to get all of the available values for all properties in the default vocabulary whose aspect is the localAspectName. |
PropertyValues |
getPropertyValues(Evidence evidence,
java.lang.String localAspectName,
java.lang.String vocabularyIRI)
Use the evidence provided to get all of the available values for all properties in the given vocabulary whose aspect is the localAspectName. |
void |
initialize(java.lang.String defaultVocabularyIRI,
java.util.Properties props)
Called to initialize the API following construction. |
PropertyRef[] |
listPropertyRefs()
List all the PropertyRefs the implementation knows about. |
Evidence |
newHTTPEvidence()
Factory method to create an object supporting the Evidence interface, intended to represent HTTP headers. |
Evidence |
newHTTPEvidence(java.util.Map<java.lang.String,java.lang.String> map)
Factory method to create an object supporting the Evidence interface, using name/value pairs from the Map parameter, representing evidence from HTTP headers. |
PropertyName |
newPropertyName(java.lang.String localPropertyName)
Factory method to create a new PropertyName instance in the default property vocabulary. |
PropertyName |
newPropertyName(java.lang.String localPropertyName,
java.lang.String vocabularyIRI)
Factory method to create a new PropertyName instance in the given property vocabulary. |
PropertyRef |
newPropertyRef(PropertyName propertyName)
Factory method to create a PropertyRef instance using the name and vocabulary of the PropertyName parameter. |
PropertyRef |
newPropertyRef(PropertyName propertyName,
java.lang.String localAspectName)
Factory method to create a PropertyRef instance using the name and vocabulary of the PropertyName parameter. |
PropertyRef |
newPropertyRef(java.lang.String localPropertyName)
Factory method to create a PropertyRef instance in the default vocabulary. |
Field Detail |
---|
static final java.lang.String NOT_SUPPORTED
Method Detail |
---|
void initialize(java.lang.String defaultVocabularyIRI, java.util.Properties props) throws NameException, InitializationException
defaultVocabularyIRI
- The IRI of the default vocabulary namespaceprops
- Implementation dependent properties
NameException
- MUST be thrown if the implementation cannot apply the parameter data.
InitializationException
- MUST be thrown in any situation that implies a failure while initializing the DDR (including the case of not being able to instantiate the class).java.lang.String getImplementationVersion()
java.lang.String getDataVersion()
PropertyRef[] listPropertyRefs()
PropertyValue getPropertyValue(Evidence evidence, PropertyRef propertyRef) throws NameException
evidence
- Evidence with which to identify the delivery context.propertyRef
- Identification of the property whose value is being queried.
NameException
- MUST be thrown (with codes NameException.VOCABULARY_NOT_RECOGNIZED or NameException.PROPERTY_NOT_RECOGNIZED) if the name data in the propertyRef parameter is invalid.PropertyValue getPropertyValue(Evidence evidence, PropertyName propertyName) throws NameException
evidence
- Evidence with which to identify the delivery context.propertyName
- Identification of the property whose value is being queried.
NameException
- MUST be thrown (with codes NameException.VOCABULARY_NOT_RECOGNIZED or NameException.PROPERTY_NOT_RECOGNIZED) if the name data in the propertyName parameter is invalid.PropertyValue getPropertyValue(Evidence evidence, java.lang.String localPropertyName) throws NameException
evidence
- Evidence with which to identify the delivery context.localPropertyName
- The local name (identifier) of the property as per the default vocabulary of properties.
NameException
- MUST be thrown (with code NameException.PROPERTY_NOT_RECOGNIZED) if the localPropertyName parameter is invalid.PropertyValue getPropertyValue(Evidence evidence, java.lang.String localPropertyName, java.lang.String localAspectName, java.lang.String vocabularyIRI) throws NameException
evidence
- Evidence with which to identify the delivery context.localPropertyName
- The local name (identifier) of the property as per the vocabulary of properties whose namespace is given.localAspectName
- The local name (identifier) of the aspect, whose namespace is the same as that of the vocabulary of properties.vocabularyIRI
- The namesapce IRI for the vocabulary of properties.
NameException
- MUST be thrown (with codes NameException.VOCABULARY_NOT_RECOGNIZED or NameException.PROPERTY_NOT_RECOGNIZED or NameException.ASPECT_NOT_RECOGNIZED) if any of the name data in the String parameters is invalid.PropertyValues getPropertyValues(Evidence evidence) throws NameException
evidence
- Evidence with which to identify the delivery context.
NameException
- for consistency with other versions of this method, but if this method does throw a NameException then it should be treated as an implementation error because there are no circumstances when this method could actually throw a NameExceptionPropertyValues getPropertyValues(Evidence evidence, PropertyRef[] propertyRefs) throws NameException
PropertyValues.getAll()
is implementation-specific
it is not correct to assume that the order of elements in propertyRefs will influence the order of
the array returned by PropertyValues.getAll()
.
The PropertyValues.getValue(PropertyRef)
method provides a more direct and interoperable
means of inspecting the return value.
evidence
- Evidence with which to identify the delivery context.propertyRefs
- Identification of the properties whose values are being queried.
NameException
- MUST be thrown (with codes NameException.VOCABULARY_NOT_RECOGNIZED or NameException.PROPERTY_NOT_RECOGNIZED or NameException.ASPECT_NOT_RECOGNIZED) if any name data in the propertyRefs parameter is invalid.PropertyValues getPropertyValues(Evidence evidence, java.lang.String localAspectName) throws NameException
evidence
- Evidence with which to identify the delivery context.localAspectName
- The name of the aspect, whose namespace is the same as the default vocabulary of properties.
NameException
- MUST be thrown (with code NameException.ASPECT_NOT_RECOGNIZED) if the localAspectName parameter is invalid.PropertyValues getPropertyValues(Evidence evidence, java.lang.String localAspectName, java.lang.String vocabularyIRI) throws NameException
evidence
- Evidence with which to identify the delivery context.localAspectName
- The name of the aspect, whose namespace is the same as the vocabulary of properties.vocabularyIRI
- The namespace of the vocabulary of properties.
NameException
- MUST be thrown (with codes NameException.VOCABULARY_NOT_RECOGNIZED or NameException.ASPECT_NOT_RECOGNIZED) if any name data in the String parameters is invalid.PropertyName newPropertyName(java.lang.String localPropertyName) throws NameException
localPropertyName
- The local name (identifier) of the property as given in the default vocabulary.
NameException
- MUST be thrown (with code NameException.PROPERTY_NOT_RECOGNIZED ) if the localPropertyName parameter is invalid.PropertyName newPropertyName(java.lang.String localPropertyName, java.lang.String vocabularyIRI) throws NameException
localPropertyName
- The local name (identifier) of the property as given in its vocabulary.vocabularyIRI
- The namespace of the property.
NameException
- MUST be thrown (with codes NameException.VOCABULARY_NOT_RECOGNIZED or NameException.PROPERTY_NOT_RECOGNIZED) if any of the parameters is invalid.PropertyRef newPropertyRef(java.lang.String localPropertyName) throws NameException
localPropertyName
- The name of the property as given in the default vocabulary.
NameException
- MUST be thrown (with code NameException.PROPERTY_NOT_RECOGNIZED) if the localPropertyName parameter is invalid.PropertyRef newPropertyRef(PropertyName propertyName) throws NameException
propertyName
- A property belonging to a specific vocabulary.
NameException
- MUST be thrown (with codes NameException.VOCABULARY_NOT_RECOGNIZED or NameException.PROPERTY_NOT_RECOGNIZED) if the name data in the propertyName parameter is invalid.PropertyRef newPropertyRef(PropertyName propertyName, java.lang.String localAspectName) throws NameException
propertyName
- A property belonging to a specific vocabulary.localAspectName
- The name of the aspect as given in the default vocabulary.
NameException
- MUST be thrown (with codes NameException.VOCABULARY_NOT_RECOGNIZED or NameException.PROPERTY_NOT_RECOGNIZED or NameException.ASPECT_NOT_RECOGNIZED) if any name data in the parameters is invalid.Evidence newHTTPEvidence()
Evidence newHTTPEvidence(java.util.Map<java.lang.String,java.lang.String> map)
map
- Mapping of names to values, assumed to represent HTTP headers.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |