|
||||||||||
| 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
info.sswap.impl.empire.model.TypeImpl
public class TypeImpl
Implementation of SSWAPType.
| 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 |
| Field Summary | |
|---|---|
private com.clarkparsia.empire.SupportsRdfId.RdfKey |
rdfKey
The RDF identifier of this type. |
private com.hp.hpl.jena.rdf.model.Resource |
resource
The Jena resource that defines this type (important for fast access to type information). |
| Constructor Summary | |
|---|---|
TypeImpl(SourceModel parent,
java.net.URI uri)
|
|
TypeImpl(SourceModel parent,
java.net.URI uri,
boolean preventOWLClass)
|
|
| Method Summary | |
|---|---|
void |
addAnnotationPredicate(SSWAPPredicate predicate,
SSWAPElement value)
Annotates a type with the given annotation predicate. |
void |
addDisjointUnionOf(java.util.Collection<SSWAPType> disjointClasses)
Adds an owl:disjointUnionOf axiom to this type |
void |
addDisjointWith(SSWAPType type)
Adds an owl:disjointWith axiom to this type. |
void |
addEquivalentClass(SSWAPType type)
Adds an owl:equivalentClass axiom to this type. |
void |
addIntersectionOf(java.util.Collection<SSWAPType> types)
Adds an owl:intersectionOf axiom to this type. |
void |
addOneOf(java.util.Collection<java.net.URI> oneOf)
Adds an owl:oneOf axiom to this type |
(package private) static void |
addRestriction(com.hp.hpl.jena.rdf.model.Model model,
com.hp.hpl.jena.rdf.model.Resource resource,
java.lang.String propertyURI,
com.hp.hpl.jena.rdf.model.Statement restrictionStatement,
boolean objectPredicate,
boolean datatypePredicate)
|
private void |
addRestriction(SSWAPPredicate predicate,
com.hp.hpl.jena.rdf.model.Statement restrictionStatement)
|
void |
addRestrictionAllValuesFrom(SSWAPPredicate predicate,
SSWAPType type)
Adds an owl:allValuesFrom restriction to this type on the specified predicate |
void |
addRestrictionCardinality(SSWAPPredicate predicate,
int cardinality)
Adds a cardinality restriction to this type on the specified predicate. |
void |
addRestrictionHasSelf(SSWAPPredicate predicate,
boolean value)
Adds an owl:hasSelf restriction to this type on the specified predicate |
void |
addRestrictionHasValue(SSWAPPredicate predicate,
SSWAPElement element)
Adds an owl:hasValue restriction to this type on the specified predicate |
void |
addRestrictionMaxCardinality(SSWAPPredicate predicate,
int maxCardinality)
Adds a max cardinality restriction to this type on the specified predicate. |
void |
addRestrictionMinCardinality(SSWAPPredicate predicate,
int minCardinality)
Adds a min cardinality restriction to this type on the specified predicate. |
void |
addRestrictionSomeValuesFrom(SSWAPPredicate predicate,
SSWAPType type)
Adds an owl:someValuesFrom restriction to this type on the specified predicate |
void |
addSubClassOf(SSWAPType type)
Adds an rdfs:subClassOf axiom to this type. |
void |
addUnionOf(java.util.Collection<SSWAPType> types)
Adds an owl:unionOf axiom to this type |
SSWAPType |
complementOf()
Creates the complement of the current type. |
private static SSWAPType |
createComplexType(SSWAPModel model,
com.hp.hpl.jena.rdf.model.Property connectingProperty,
java.util.Collection<SSWAPType> types)
|
private static void |
createComplexType(SSWAPModel model,
TypeImpl resultType,
com.hp.hpl.jena.rdf.model.Property connectingProperty,
java.util.Collection<SSWAPType> types)
Creates a complex type that consists of multiple other types connected by a property (e.g., owl:intersectionOf or owl:unionOf). |
private com.hp.hpl.jena.rdf.model.Statement |
createRdfTypeStatement(java.net.URI typeURI)
Creates a Jena statement that states that this type is an owl:Class. |
boolean |
equals(java.lang.Object o)
|
com.clarkparsia.empire.SupportsRdfId.RdfKey |
getRdfId()
Gets the RDF identifier of this type. |
private ReasoningServiceImpl |
getReasoningServiceImpl()
|
(package private) com.hp.hpl.jena.rdf.model.Resource |
getResource()
Gets the corresponding Jena resource for this type. |
int |
hashCode()
Overridden hash code method to make sure that the generated hashcodes are consistent with the overriden equals() method. |
static SSWAPType |
intersectionOf(SSWAPModel model,
java.util.Collection<SSWAPType> types)
Creates a complex type that is an intersection of the specified types. |
SSWAPType |
intersectionOf(SSWAPType a)
Creates and returns a new type that is an intersection of this type and the given type. |
boolean |
isIntersection()
|
boolean |
isNothing()
Checks whether this type is unsatisfiable (i.e., whether it is a sub type of owl:Nothing). |
boolean |
isReserved()
Checks whether the given type belongs to restricted vocabulary (e.g., types defined in RDF, RDFS, OWL or SSWAP namespaces). |
boolean |
isStrictSubTypeOf(SSWAPType superType)
Checks whether this type is a strict subtype of the other. |
boolean |
isSubTypeOf(SSWAPType superType)
Checks whether this type is a subtype of the other. |
void |
serialize(java.io.OutputStream os,
RDFRepresentation representation,
boolean commentedOutput)
Serializes the contents of this object to the specified stream. |
void |
setRdfId(com.clarkparsia.empire.SupportsRdfId.RdfKey rdfKey)
Sets the RDF identifier of this type. |
java.lang.String |
toString()
Returns the string representation of the RDF identifier of this type. |
static SSWAPType |
unionOf(SSWAPModel model,
java.util.Collection<SSWAPType> types)
Creates a complex type that is a union of the specified types. |
SSWAPType |
unionOf(SSWAPType a)
Creates and returns a new type that is a union of this type and the given type. |
| Methods inherited from class info.sswap.impl.empire.model.ElementImpl |
|---|
addComment, addLabel, asBoolean, asDouble, asIndividual, asInteger, asList, asLiteral, asString, getComment, getJenaResource, getLabel, isAnonymous, isIndividual, isList, isLiteral |
| 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, setDereferenced, setNsPrefix, setSourceModel, setURI, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface info.sswap.api.model.SSWAPElement |
|---|
addComment, addLabel, asBoolean, asDouble, asIndividual, asInteger, asList, asLiteral, asString, getComment, getLabel, isIndividual, isList, isLiteral |
| 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, setNsPrefix, validate |
| Field Detail |
|---|
private com.clarkparsia.empire.SupportsRdfId.RdfKey rdfKey
private com.hp.hpl.jena.rdf.model.Resource resource
| Constructor Detail |
|---|
public TypeImpl(SourceModel parent,
java.net.URI uri)
public TypeImpl(SourceModel parent,
java.net.URI uri,
boolean preventOWLClass)
| Method Detail |
|---|
com.hp.hpl.jena.rdf.model.Resource getResource()
private com.hp.hpl.jena.rdf.model.Statement createRdfTypeStatement(java.net.URI typeURI)
public SSWAPType complementOf()
SSWAPType
complementOf in interface SSWAPType
private static void createComplexType(SSWAPModel model,
TypeImpl resultType,
com.hp.hpl.jena.rdf.model.Property connectingProperty,
java.util.Collection<SSWAPType> types)
throws java.lang.IllegalArgumentException
model - the model where the type should be storedresultType - the type to which the resultant type will be addedconnectingProperty - the property (currently only owl:intersectionOf and owl:unionOf make sense)types - the types to be connected -- must be a list of at least two types
java.lang.IllegalArgumentException - if the list of types does not contain at least two types or the objects were not created
by this API implementation
private static SSWAPType createComplexType(SSWAPModel model,
com.hp.hpl.jena.rdf.model.Property connectingProperty,
java.util.Collection<SSWAPType> types)
public static SSWAPType intersectionOf(SSWAPModel model,
java.util.Collection<SSWAPType> types)
model - the model that will store the typestypes - the types to be included in the intersection
public SSWAPType intersectionOf(SSWAPType a)
SSWAPType
intersectionOf in interface SSWAPTypea - the other type, with which the intersection is taken
public static SSWAPType unionOf(SSWAPModel model,
java.util.Collection<SSWAPType> types)
model - the model that will store the typestypes - the types to be included in the union
public SSWAPType unionOf(SSWAPType a)
SSWAPType
unionOf in interface SSWAPTypea - the other type, with which the union is taken.
public com.clarkparsia.empire.SupportsRdfId.RdfKey getRdfId()
getRdfId in interface com.clarkparsia.empire.SupportsRdfIdpublic void setRdfId(com.clarkparsia.empire.SupportsRdfId.RdfKey rdfKey)
setRdfId in interface com.clarkparsia.empire.SupportsRdfIdrdfKey - the RDF identifier of this type (URL or BNode identifier).public java.lang.String toString()
toString in class java.lang.Objectpublic void addUnionOf(java.util.Collection<SSWAPType> types)
SSWAPType
addUnionOf in interface SSWAPTypetypes - SSWAPTypes that compose the unionpublic void addIntersectionOf(java.util.Collection<SSWAPType> types)
SSWAPType
addIntersectionOf in interface SSWAPTypetypes - SSWAPTypes that compose the intersectionpublic void addDisjointUnionOf(java.util.Collection<SSWAPType> disjointClasses)
SSWAPType
addDisjointUnionOf in interface SSWAPTypedisjointClasses - SSWAPTypes that compose the disjointednesspublic void addDisjointWith(SSWAPType type)
SSWAPType
addDisjointWith in interface SSWAPTypetype - the disjoint type with this onepublic void addEquivalentClass(SSWAPType type)
SSWAPType
addEquivalentClass in interface SSWAPTypetype - the equivalent typepublic void addOneOf(java.util.Collection<java.net.URI> oneOf)
SSWAPType
addOneOf in interface SSWAPTypeoneOf - the collection of URIs that will be converted into argument to owl:oneOf
public void addRestrictionAllValuesFrom(SSWAPPredicate predicate,
SSWAPType type)
SSWAPType
addRestrictionAllValuesFrom in interface SSWAPTypepredicate - predicate to which the restriction appliestype - the argument for owl:allValuesFrom
public void addRestrictionHasSelf(SSWAPPredicate predicate,
boolean value)
SSWAPType
addRestrictionHasSelf in interface SSWAPTypepredicate - predicate to which the restriction appliesvalue - a boolean value (argument to owl:hasSelf)
public void addRestrictionHasValue(SSWAPPredicate predicate,
SSWAPElement element)
SSWAPType
addRestrictionHasValue in interface SSWAPTypepredicate - predicate to which the restriction applieselement - the value for owl:hasValue
public void addRestrictionMaxCardinality(SSWAPPredicate predicate,
int maxCardinality)
SSWAPType
addRestrictionMaxCardinality in interface SSWAPTypepredicate - predicate to which the cardinality restriction appliesmaxCardinality - the value of the maxCardinality
public void addRestrictionMinCardinality(SSWAPPredicate predicate,
int minCardinality)
SSWAPType
addRestrictionMinCardinality in interface SSWAPTypepredicate - predicate to which the cardinality restriction appliesminCardinality - the value of the minCardinality
public void addRestrictionCardinality(SSWAPPredicate predicate,
int cardinality)
SSWAPType
addRestrictionCardinality in interface SSWAPTypepredicate - predicate to which the cardinality restriction appliescardinality - the cardinality value
public void addRestrictionSomeValuesFrom(SSWAPPredicate predicate,
SSWAPType type)
SSWAPType
addRestrictionSomeValuesFrom in interface SSWAPTypepredicate - predicate to which the restriction appliestype - the argument for owl:someValuesFrom
private void addRestriction(SSWAPPredicate predicate,
com.hp.hpl.jena.rdf.model.Statement restrictionStatement)
static void addRestriction(com.hp.hpl.jena.rdf.model.Model model,
com.hp.hpl.jena.rdf.model.Resource resource,
java.lang.String propertyURI,
com.hp.hpl.jena.rdf.model.Statement restrictionStatement,
boolean objectPredicate,
boolean datatypePredicate)
public void addSubClassOf(SSWAPType type)
SSWAPType
addSubClassOf in interface SSWAPTypetype - the super type
public void addAnnotationPredicate(SSWAPPredicate predicate,
SSWAPElement value)
SSWAPType
addAnnotationPredicate in interface SSWAPTypepredicate - the predicate to be used in annotationprivate ReasoningServiceImpl getReasoningServiceImpl()
public boolean isSubTypeOf(SSWAPType superType)
SSWAPType
isSubTypeOf in interface SSWAPTypesuperType - the potential super type
public boolean isStrictSubTypeOf(SSWAPType superType)
SSWAPType
isStrictSubTypeOf in interface SSWAPTypesuperType - the potential super type
public boolean isNothing()
SSWAPType
isNothing in interface SSWAPTypepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isReserved()
SSWAPType
isReserved in interface SSWAPTypepublic boolean isIntersection()
public void serialize(java.io.OutputStream os,
RDFRepresentation representation,
boolean commentedOutput)
SSWAPModel
serialize in interface SSWAPModelserialize in class ModelImplos - output streamrepresentation - the representation, in which the contents should be written (e.g., RDF/XML).commentedOutput - true, if the output should contain comments about various standard sections of an RDG (valid only for
RDF/XML)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||