|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SSWAPDocument
Represents a document in SSWAP that holds RDF content, such as may be hosted
on the web (e.g., an RDG). A SSWAPDocument
may contain elements such as individuals and properties, or define types or
predicates. Instances of SSWAPDocuments can be read or created
by the main SSWAP class.
SSWAP,
SSWAPElement| Method Summary | ||
|---|---|---|
SSWAPDatatype |
createAnonymousDatatype()
Creates an anonymous SSWAPDatatype |
|
SSWAPType |
createAnonymousType()
Creates anonymous type. |
|
SSWAPIndividual |
createIndividual()
Creates an anonymous SSWAPIndividual (blank node). |
|
SSWAPIndividual |
createIndividual(java.net.URI uri)
Creates a SSWAPIndividual representation of a specific resource (URI). |
|
SSWAPType |
createIntersectionOf(java.util.Collection<SSWAPType> types)
Creates a SSWAPType in the specified model that is an intersection of the given types. |
|
SSWAPList |
createList()
Creates an empty list. |
|
SSWAPLiteral |
createLiteral(java.lang.String value)
Creates a literal with the specified value. |
|
SSWAPLiteral |
createTypedLiteral(java.lang.String value,
java.net.URI datatypeURI)
Creates a SSWAPElement that is a typed literal with the specified value. |
|
SSWAPType |
createUnionOf(java.util.Collection<SSWAPType> types)
Creates a SSWAPType in the specified model that is a union of the given types. |
|
SSWAPDatatype |
getDatatype(java.net.URI uri)
Gets a named datatype object |
|
SSWAPPredicate |
getPredicate(java.net.URI uri)
Gets a SSWAPPredicate object for the given property URI. |
|
SSWAPType |
getType(java.net.URI uri)
Gets a SSWAPType for an URI. |
|
|
newIndividual(T sourceIndividual)
Creates a new, anonymous individual, and populates it with data from the sourceIndividual (essentially clones the source individual). |
|
|
newIndividual(T sourceIndividual,
java.net.URI targetURI)
Copies the data from the sourceIndividual into the
individual whose URI is passed as targetURI. |
|
| Methods inherited from interface info.sswap.api.model.SSWAPModel |
|---|
addImport, checkProfile, dereference, dereference, doClosure, getDocument, getImports, getInputStream, getNsPrefixMap, getReasoningService, getTypeSignature, getURI, isDereferenced, removeImport, removeNsPrefix, serialize, serialize, setNsPrefix, validate |
| Method Detail |
|---|
SSWAPType getType(java.net.URI uri)
uri - the URI of the type
SSWAPType createAnonymousType()
SSWAPIndividual createIndividual()
SSWAPIndividual createIndividual(java.net.URI uri)
uri - the URI of the individual to be created
SSWAPList createList()
SSWAPLiteral createLiteral(java.lang.String value)
value - the value of the literal
SSWAPLiteral createTypedLiteral(java.lang.String value,
java.net.URI datatypeURI)
throws java.lang.IllegalArgumentException
value - the value of the literaldatatypeURI - the URI of the datatype
java.lang.IllegalArgumentException - if the value is not valid according to the declared datatype URISSWAPType createIntersectionOf(java.util.Collection<SSWAPType> types)
types - the types
SSWAPType createUnionOf(java.util.Collection<SSWAPType> types)
types - the types
SSWAPPredicate getPredicate(java.net.URI uri)
uri - the URI of the property
SSWAPDatatype createAnonymousDatatype()
SSWAPDatatype getDatatype(java.net.URI uri)
uri - the URI of the datatype
<T extends SSWAPIndividual> T newIndividual(T sourceIndividual)
throws java.lang.IllegalArgumentException
sourceIndividual (essentially clones the source individual).
This method is equivalent to
newIndividual(sourceIndividual,null);
T - the type of the individualsourceIndividual - the individual to be used as a source of data for populating
the new individual
java.lang.IllegalArgumentException - on an attempt to copy a SSWAPNode into a generic
SSWAPDocument that is not a SSWAPProtocol documentnewIndividual(SSWAPIndividual, URI)
<T extends SSWAPIndividual> T newIndividual(T sourceIndividual,
java.net.URI targetURI)
throws java.lang.IllegalArgumentException
sourceIndividual into the
individual whose URI is passed as targetURI. If there is not
yet an individual with such a URI, it is created. If
targetURI is null, an anonymous individual is created.
Notes:
sourceIndividual is a deep copy;
i.e., if there are any object properties with anonymous
individuals as values, a deep copy is performed on those individuals
recursively. If there are any object properties with named individuals as
values, those named individual are not copied.SSWAPType) and its properties (SSWAPProperty).
In particular, associations with SSWAPNodes are not copied
(e.g., if a SSWAPSubject is being copied, the copy
will not contain references to SSWAPObjects or
SSWAPGraphs; if desired, these must be made explicitly).SSWAPDocument to this method) --
a deep copy will be made across the documents, including named
individuals. The restriction specified in (2) still holds (i.e.,
references to SSWAPNodes are not copied across documents).SSWAPNodes (e.g., SSWAPResource,
SSWAPSubject, SSWAPObject) are supported only
in SSWAPProtocol documents (e.g., RDG,
RIG, RRG, RQG). An attempt to copy
them into a generic SSWAPDocument (e.g., a document
containing a definition of SSWAPType or
owl:Class) throws an IllegalArgumentException.
T - the type of the individualsourceIndividual - the individual with the data to be copiedtargetURI - the URI of the new individual; may be null for an anonymous
individual
java.lang.IllegalArgumentException - on an attempt to copy a SSWAPNode into a generic
SSWAPDocument that is not a SSWAPProtocol document
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||