本文整理汇总了Java中gate.creole.ontology.OConstants.TRANSITIVE_PROPERTY属性的典型用法代码示例。如果您正苦于以下问题:Java OConstants.TRANSITIVE_PROPERTY属性的具体用法?Java OConstants.TRANSITIVE_PROPERTY怎么用?Java OConstants.TRANSITIVE_PROPERTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类gate.creole.ontology.OConstants
的用法示例。
在下文中一共展示了OConstants.TRANSITIVE_PROPERTY属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInverseProperties
public Set<ObjectProperty> getInverseProperties() {
Property[] properties = ontologyService.getInverseProperties(
this.nodeId.toString());
Set<ObjectProperty> set = new HashSet<ObjectProperty>();
for (int i = 0; i < properties.length; i++) {
byte type = properties[i].getType();
if (type != OConstants.OBJECT_PROPERTY
&& type != OConstants.SYMMETRIC_PROPERTY
&& type != OConstants.TRANSITIVE_PROPERTY)
throw new GateOntologyException(
"Invalid Property type returned as an inverse property");
set.add((ObjectProperty) Utils.createOProperty(
this.ontology, this.ontologyService, properties[i].getUri(), properties[i]
.getType()));
}
return set;
}
示例2: createPropertyObject
private Property createPropertyObject(String uri)
throws GateOntologyException {
byte type = OConstants.ANNOTATION_PROPERTY;
if (isAnnotationProperty(uri)) {
type = OConstants.ANNOTATION_PROPERTY;
} else if (isObjectProperty(uri)) {
type = OConstants.OBJECT_PROPERTY;
} else if (isDatatypeProperty(uri)) {
type = OConstants.DATATYPE_PROPERTY;
} else if (isTransitiveProperty(uri)) {
type = OConstants.TRANSITIVE_PROPERTY;
} else if (isSymmetricProperty(uri)) {
type = OConstants.SYMMETRIC_PROPERTY;
} else if (isRDFProperty(uri)) {
type = OConstants.RDF_PROPERTY;
} else {
return null;
}
return new Property(type, uri);
}
示例3: getPropertyType
private byte getPropertyType(String aPropertyURI)
throws GateOntologyException {
if (isDatatypeProperty(aPropertyURI)) {
return OConstants.DATATYPE_PROPERTY;
} else if (isTransitiveProperty(aPropertyURI)) {
return OConstants.TRANSITIVE_PROPERTY;
} else if (isSymmetricProperty(aPropertyURI)) {
return OConstants.SYMMETRIC_PROPERTY;
} else if (isObjectProperty(aPropertyURI)) {
return OConstants.OBJECT_PROPERTY;
} else if (isAnnotationProperty(aPropertyURI)) {
return OConstants.ANNOTATION_PROPERTY;
} else {
return OConstants.RDF_PROPERTY;
}
}
示例4: getInverseProperties
public Set<ObjectProperty> getInverseProperties() {
Property[] properties = ontologyService.getInverseProperties(
this.nodeId.toString());
Set<ObjectProperty> set = new HashSet<ObjectProperty>();
for(int i = 0; i < properties.length; i++) {
byte type = properties[i].getType();
if(type != OConstants.OBJECT_PROPERTY
&& type != OConstants.SYMMETRIC_PROPERTY
&& type != OConstants.TRANSITIVE_PROPERTY)
throw new GateOntologyException(
"Invalid Property type returned as an inverse property");
set.add((ObjectProperty)Utils.createOProperty(
this.ontology, this.ontologyService, properties[i].getUri(), properties[i]
.getType()));
}
return set;
}
示例5: createPropertyObject
private Property createPropertyObject(String uri)
throws GateOntologyException {
OURI ouri = ontology.createOURI(uri);
byte type = OConstants.ANNOTATION_PROPERTY;
if (isAnnotationProperty(ouri)) {
type = OConstants.ANNOTATION_PROPERTY;
} else if (isObjectProperty(ouri)) {
type = OConstants.OBJECT_PROPERTY;
} else if (isDatatypeProperty(ouri)) {
type = OConstants.DATATYPE_PROPERTY;
} else if (isTransitiveProperty(ouri)) {
type = OConstants.TRANSITIVE_PROPERTY;
} else if (isSymmetricProperty(ouri)) {
type = OConstants.SYMMETRIC_PROPERTY;
} else if (isRDFProperty(ouri)) {
type = OConstants.RDF_PROPERTY;
} else {
return null;
}
return new Property(type, uri);
}
示例6: getPropertyType
private byte getPropertyType(OURI aPropertyURI)
throws GateOntologyException {
if (isDatatypeProperty(aPropertyURI)) {
return OConstants.DATATYPE_PROPERTY;
} else if (isTransitiveProperty(aPropertyURI)) {
return OConstants.TRANSITIVE_PROPERTY;
} else if (isSymmetricProperty(aPropertyURI)) {
return OConstants.SYMMETRIC_PROPERTY;
} else if (isObjectProperty(aPropertyURI)) {
return OConstants.OBJECT_PROPERTY;
} else if (isAnnotationProperty(aPropertyURI)) {
return OConstants.ANNOTATION_PROPERTY;
} else {
return OConstants.RDF_PROPERTY;
}
}
示例7: createOProperty
/**
* Given required parameters, this method, based on the provided type,
* returns an appropriate object of a property.
*
* @param repositoryID
* @param ontology
* @param ontologyService
* @param uri
* @param type
* @return
*/
public static RDFProperty createOProperty(
Ontology ontology, OWLOntologyService ontologyService, String uri, byte type) {
// TODO: get rid of getOResourceFromMap here!
// Test simply commenting out for now
RDFProperty prop = null; // = (RDFProperty)ontology.getOResourceFromMap(uri);
//if(prop != null) return prop;
switch (type) {
case OConstants.ANNOTATION_PROPERTY:
return new AnnotationPropertyImpl(new OURIImpl(uri), ontology,
ontologyService);
case OConstants.RDF_PROPERTY:
return new RDFPropertyImpl(new OURIImpl(uri), ontology,
ontologyService);
case OConstants.OBJECT_PROPERTY:
return new ObjectPropertyImpl(new OURIImpl(uri), ontology,
ontologyService);
case OConstants.SYMMETRIC_PROPERTY:
return new SymmetricPropertyImpl(new OURIImpl(uri), ontology,
ontologyService);
case OConstants.TRANSITIVE_PROPERTY:
return new TransitivePropertyImpl(new OURIImpl(uri), ontology,
ontologyService);
case OConstants.DATATYPE_PROPERTY:
return new DatatypePropertyImpl(new OURIImpl(uri), ontology,
ontologyService);
default:
return null;
}
}