|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.ontologies.data.impl.DirectoryImpl
public class DirectoryImpl
Directory
implementation.
Directory
Field Summary | |
---|---|
private SSWAPType |
data_DataFormat
|
private SSWAPPredicate |
data_hasData
|
private java.util.HashSet<Data> |
dataSet
|
private SSWAPIndividual |
sswapIndividual
|
Constructor Summary | |
---|---|
DirectoryImpl(SSWAPIndividual sswapIndividual)
Create a Directory from the subject individual. |
Method Summary | |
---|---|
java.util.Collection<Data> |
getData()
For every data:hasData statement on the subject individual (set
at the DataFactory.Directory(SSWAPIndividual) ), return a
Collection of Data objects constructed from property
instance values. |
SSWAPIndividual |
getIndividual()
The individual subject for the data:hasData statements. |
void |
setData()
Build the Collection to be returned by Directory.getData() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private SSWAPPredicate data_hasData
private SSWAPType data_DataFormat
private SSWAPIndividual sswapIndividual
private java.util.HashSet<Data> dataSet
Constructor Detail |
---|
public DirectoryImpl(SSWAPIndividual sswapIndividual) throws DataException
Directory
from the subject individual.
sswapIndividual
- Individual for which to inspect for data:hasData
properties.
DataException
- upon failure to internally setData()
Method Detail |
---|
public SSWAPIndividual getIndividual()
Directory
data:hasData
statements.
getIndividual
in interface Directory
DataFactory.Directory(SSWAPIndividual)
public java.util.Collection<Data> getData()
Directory
data:hasData
statement on the subject individual (set
at the DataFactory.Directory(SSWAPIndividual)
), return a
Collection
of Data
objects constructed from property
instance values. Include in this Collection
the source individual
itself if it belongs to the type data:DataFormat
(the
rdfs:range
of data:hasData
), even if it does not have the
property explicitly reflexive on itself.
One may then use the Data.readData()
,
Data.writeData(java.io.InputStream)
, etc. methods on the
Collection
of indirectly referenced data.
A single Data
object shall be returned per unique
data:hasData
individual. Consider the following case: an
individual has two distinct subproperties of data:hasData
, each
with the same individual value. In this case, the relation of the
super-property data:hasData
to the individual value may appear
one or more times--there being no logical difference between it being
present once, twice, thrice, etc. In the following pseudo-code we see
only one instance of the data:hasData
property:
:readFromThisFile rdfs:subPropertyOf data:hasData . :writeToThisFile rdfs:subPropertyOf data:hasData . :someInd :readFromThisFile :aFile . :someInd :writeToThisFile :aFile .A reasoner will infer the single statement:
:someInd data:hasData :aFile .Similarly, even if
:someInd
had only one subproperty, (it) or the
super-property relation may appear one or more times; there being no new
inferences that could be derived given the number of times a statement
re-occurs. (Re the Open World Assumption, cardinality restrictions are
relevant only if the object of multiple instances of an object property
are not necessarily equivalent. Lexical [URI] equivalence implies
necessary logical equivalence).
Thus, this method shall return a single Data
object per unique
data:hasData
statement, regardless of the actual number of
instances observed. It may not be assumed that reasoning is used by the
method (the method need make no assumption about reasoning on the
SSWAPDocument).
getData
in interface Directory
Data
objects from all unique
data:hasData
property statements and the presence of the
type data:DataFormat
on the subject individual itself, if
applicable. The absence of any data:hasData
properties on
a non- data:DataFormat
individual results in the return
of an empty (but not null) collection.DataFactory.Directory(info.sswap.api.model.SSWAPIndividual)
public void setData() throws DataException
Directory
Collection
to be returned by Directory.getData()
. Relevant
if the subject individual has changed. Called automatically (and does not
need to be called explicitly prior) to calling getData
on its
first invocation.
setData
in interface Directory
DataException
- Upon the presence of a data:hasData
property, but a
failure to extract its value and create a Data
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |