|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.sswap.impl.empire.model.ModelImpl
info.sswap.impl.empire.model.ElementImpl
public abstract class ElementImpl
Implements a SSWAPElement (an element in SSWAP other than an RDF data source like a PDG or a canonical/protocol graph)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.clarkparsia.empire.SupportsRdfId |
|---|
com.clarkparsia.empire.SupportsRdfId.BNodeKey, com.clarkparsia.empire.SupportsRdfId.RdfKey<T>, com.clarkparsia.empire.SupportsRdfId.URIKey |
| Constructor Summary | |
|---|---|
ElementImpl()
|
|
| Method Summary | |
|---|---|
void |
addComment(java.lang.String comment)
Adds and rdfs:comment to this type. |
void |
addLabel(java.lang.String label)
Adds an rdfs:label statement to this type. |
java.lang.Boolean |
asBoolean()
Type-safe case of this element to a boolean. |
java.lang.Double |
asDouble()
Type-safe cast of this element to a double. |
SSWAPIndividual |
asIndividual()
Type-safe cast of this element to a SSWAPIndividual. |
java.lang.Integer |
asInteger()
Type-safe cast of this element to an integer. |
SSWAPList |
asList()
Type-safe cast of this element to a list. |
SSWAPLiteral |
asLiteral()
Type-safe cast of this element to SSWAPLiteral. |
java.lang.String |
asString()
Type-safe cast of this element to a String. |
java.lang.String |
getComment()
Returns that rdfs:comment value of this type or null if no comment exists. |
protected com.hp.hpl.jena.rdf.model.Resource |
getJenaResource(com.hp.hpl.jena.rdf.model.Model model)
Retrieves a corresponding Jena resource for this element from a Jena model |
java.lang.String |
getLabel()
Returns that rdfs:label value of this type or null if no label exists. |
boolean |
isAnonymous()
|
boolean |
isIndividual()
Checks whether this element is a SSWAPIndividual. |
boolean |
isList()
Checks whether this element is a list of SSWAPElements. |
boolean |
isLiteral()
Checks whether this element is a literal. |
| Methods inherited from class info.sswap.impl.empire.model.ModelImpl |
|---|
addImport, assertModel, assertSourceModel, checkProfile, dereference, dereference, doClosure, getAllDependentObjects, getDependentObject, getDocument, getExpressivity, getImports, getInputStream, getNsPrefixMap, getReasoningService, getSourceModel, getTypeSignature, getURI, hasSourceModel, hasSourceModelWithEntityManager, isDereferenced, persist, rdfIdEquals, rdfIdHashCode, refresh, refreshSiblings, removeImport, removeNsPrefix, serialize, serialize, setDereferenced, setNsPrefix, setSourceModel, setURI, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 |
| Methods inherited from interface com.clarkparsia.empire.SupportsRdfId |
|---|
getRdfId, setRdfId |
| Constructor Detail |
|---|
public ElementImpl()
| Method Detail |
|---|
public java.lang.Boolean asBoolean()
SSWAPElement
asBoolean in interface SSWAPElementpublic java.lang.Double asDouble()
SSWAPElement
asDouble in interface SSWAPElementpublic SSWAPIndividual asIndividual()
SSWAPElement
asIndividual in interface SSWAPElementpublic java.lang.Integer asInteger()
SSWAPElement
asInteger in interface SSWAPElementpublic SSWAPList asList()
SSWAPElement
asList in interface SSWAPElementpublic java.lang.String asString()
SSWAPElement
asString in interface SSWAPElementpublic SSWAPLiteral asLiteral()
SSWAPElement
asLiteral in interface SSWAPElementpublic boolean isIndividual()
SSWAPElement
isIndividual in interface SSWAPElementpublic boolean isList()
SSWAPElement
isList in interface SSWAPElementpublic boolean isLiteral()
SSWAPElement
isLiteral in interface SSWAPElementpublic boolean isAnonymous()
protected com.hp.hpl.jena.rdf.model.Resource getJenaResource(com.hp.hpl.jena.rdf.model.Model model)
model - the model that should contain information about this element
public void addLabel(java.lang.String label)
SSWAPElement
addLabel in interface SSWAPElementlabel - the label to be addedpublic void addComment(java.lang.String comment)
SSWAPElement
addComment in interface SSWAPElementcomment - the comment to be added to this typepublic java.lang.String getLabel()
SSWAPElementnull if no label exists. If multiple labels exist for
the type any one of them is returned. For literal labels, only the lexical form is returned not the type nor the
language identifier.
getLabel in interface SSWAPElementnull if no label existspublic java.lang.String getComment()
SSWAPElementnull if no comment exists. If multiple comments
exist for the type any one of them is returned. For literal comments, only the lexical form is returned not the
type nor the language identifier.
getComment in interface SSWAPElementnull if no comment exists
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||