|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.ontologies.data.impl.AbstractData
public abstract class AbstractData
emphasize point that in cases: 1. one literal data prop 2. no literal data prop but ind URL that all is automatic: just call readData and writeData
Field Summary | |
---|---|
protected SSWAPType |
DataFormatType
|
protected SSWAPDocument |
sswapDocument
|
protected SSWAPIndividual |
sswapIndividual
|
Constructor Summary | |
---|---|
AbstractData(SSWAPIndividual sswapIndividual)
Constructor to access a literalData property or the individual itself as the data object. |
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()
|
private java.util.Set<java.net.URI> |
getObjectURIs(java.net.URI objectPredicateURI)
Returns the URIs that correspond to the objects of an object property. |
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. |
protected boolean |
hasValue(java.net.URI ontologyPredicateURI,
java.net.URI value)
Returns true if any instance of the predicate has the given value; false otherwise. |
java.lang.String |
inputStreamToString(java.io.InputStream inputStream)
Convenience method to convert an input stream into a string. |
java.io.InputStream |
parse(java.io.InputStream inputStream)
Default implementation just passes inputStream untouched. |
java.io.InputStream |
serialize(java.io.InputStream inputStream)
Default implementation just passes inputStream untouched. |
protected void |
setValue(java.net.URI ontologyPredicateURI,
java.net.URI value,
boolean on)
Sets th |
java.io.InputStream |
stringToInputStream(java.lang.String string)
Convenience method to convert a string into an input stream. |
java.io.InputStream |
validate(java.io.InputStream inputStream)
Default implementation just passes inputStream untouched. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface info.sswap.ontologies.data.api.Data |
---|
readData, writeData |
Field Detail |
---|
protected final SSWAPType DataFormatType
protected final SSWAPDocument sswapDocument
protected final SSWAPIndividual sswapIndividual
Constructor Detail |
---|
public AbstractData(SSWAPIndividual sswapIndividual) throws DataException
setDataElement as part of the initialization.
- Parameters:
sswapIndividual
- individual to be the subject of data types and properties
- Throws:
DataException
Method Detail |
---|
public java.io.InputStream parse(java.io.InputStream inputStream) throws java.io.IOException, ParserException
parse
in interface Parser
inputStream
- raw (unparsed) stream to be read
java.io.IOException
- on any network error
ParserException
- on any Parser-specific errorpublic java.io.InputStream serialize(java.io.InputStream inputStream) throws java.io.IOException, SerializerException
serialize
in interface Serializer
inputStream
- raw (un-serialized) stream to be read
java.io.IOException
- on any network error
SerializerException
- on any Serializer-specific errorpublic java.io.InputStream validate(java.io.InputStream inputStream) throws java.io.IOException, ValidatorException
validate
in interface Validator
inputStream
- raw (pre-validated) stream to be read
java.io.IOException
- on any network error
ValidatorException
- on any Validator-specific errorprotected boolean hasValue(java.net.URI ontologyPredicateURI, java.net.URI value)
ontologyPredicateURI
- value
- base64Parser or base64Serializer
protected void setValue(java.net.URI ontologyPredicateURI, java.net.URI value, boolean on)
ontologyPredicateURI
- value
- base64Parser or base64Serializerpublic java.lang.String inputStreamToString(java.io.InputStream inputStream)
inputStream
- stream to read
public java.io.InputStream stringToInputStream(java.lang.String string)
string
- string to read
public java.util.Set<SSWAPType> getFormats()
Data
getFormats
in interface Data
public java.util.Set<java.net.URI> getAccessors()
Data
Accessors are determined by the values of the
data:hasAccessor
property.
getAccessors
in interface Data
public java.util.Set<java.net.URI> getParsers()
Data
Parsers are determined by the values of the
data:hasParser
property.
getParsers
in interface Data
public java.util.Set<java.net.URI> getSerializers()
Data
Serializer are determined by the values of the
data:hasSerializer
property.
getSerializers
in interface Data
public java.util.Set<java.net.URI> getValidators()
Data
Validators are determined by the values of the
data:hasValidator
property.
getValidators
in interface Data
public SSWAPIndividual getIndividual()
getIndividual
in interface Data
private java.util.Set<java.net.URI> getObjectURIs(java.net.URI objectPredicateURI)
objectPredicateURI
- URI of the property for which to return its object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |