|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Data
The data
package standardizes a simple interface to arbitrary
data for semantic Web services.
The package works in concert with the data ontology at http://sswapmeet.sswap.info/data. The ontology allows "the data itself"
to be either a literal or to reside at a URI, whereby the data is retrieved
by dereferencing the URI and reading the input stream. When data resides at a
URI, it is commonly either the URI of a SSWAPSubject
, or the
object (property value) of the data:hasData
predicate.
In the first case where the data is literal, the data is instantiated as the
value to a datatype property. The data ontology has a super-property called
data:literalData
that should be used as the root property for
all data literal properties. Users may rdfs:subPropertyOf
data:literalData
to make specific properties as they need. This
API (Application Programming Interface) relies on SSWAP's transaction-time
reasoning to map every such subproperty instance to an instance of
data:literalData
. The API then operates on instances of
data:literalData
to retrieve the data.
The second case is where the data is to be dereferenced from the individual
itself. To signify this, the resource should belong to the type
data:DataFormat
, and in most cases, to a domain-specific
subClass (e.g., seq:FASTA) of this marker class. In the absence of a
data:literalData
superproperty, the data is considered to be at
the URI.
In simple (and recommended) cases, the SSWAPSubject
itself is
typed to some data format. Using this class on the subject returns the data.
Directory
,
RDG
,
RIG
,
SSWAPIndividual
,
SSWAPSubject
Method Summary | |
---|---|
java.util.Set<java.net.URI> |
getAccessors()
Return a set of URIs of declared accessors for the data. |
java.util.Set<SSWAPType> |
getFormats()
Get explicit and inferred subTypes of data:DataFormat |
SSWAPIndividual |
getIndividual()
|
java.util.Set<java.net.URI> |
getParsers()
Return a set of URIs for declared parsers for the data. |
java.util.Set<java.net.URI> |
getSerializers()
Return a set of URIs for declared serializers for the data. |
java.util.Set<java.net.URI> |
getValidators()
Return a set of URIs for declared validators for the data. |
java.io.InputStream |
readData()
Read the current data element (either a literal or by dereferencing the individual itself). |
void |
writeData(java.io.InputStream inputStream)
|
Method Detail |
---|
java.io.InputStream readData() throws java.io.IOException, DataException
java.io.IOException
- on any stream error
DataException
- on data error such as parsing, validating, etc.void writeData(java.io.InputStream inputStream) throws java.io.IOException, DataException
inputStream
- the stream to read for writing the data to the current data element
java.io.IOException
- on any stream error
DataException
- on data error such as validating, serializing, etc.java.util.Set<SSWAPType> getFormats()
java.util.Set<java.net.URI> getAccessors()
Accessors are determined by the values of the
data:hasAccessor
property.
java.util.Set<java.net.URI> getParsers()
Parsers are determined by the values of the
data:hasParser
property.
java.util.Set<java.net.URI> getSerializers()
Serializer are determined by the values of the
data:hasSerializer
property.
java.util.Set<java.net.URI> getValidators()
Validators are determined by the values of the
data:hasValidator
property.
SSWAPIndividual getIndividual()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |