本文整理汇总了Java中org.semanticweb.owlapi.model.OWLObjectPropertyExpression类的典型用法代码示例。如果您正苦于以下问题:Java OWLObjectPropertyExpression类的具体用法?Java OWLObjectPropertyExpression怎么用?Java OWLObjectPropertyExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OWLObjectPropertyExpression类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLObjectPropertyExpression类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: OWLAxioms
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
public OWLAxioms() {
m_classes=new HashSet<OWLClass>();
m_objectProperties=new HashSet<OWLObjectProperty>();
m_objectPropertiesOccurringInOWLAxioms=new HashSet<OWLObjectProperty>();
m_complexObjectPropertyExpressions=new HashSet<OWLObjectPropertyExpression>();
m_dataProperties=new HashSet<OWLDataProperty>();
m_namedIndividuals=new HashSet<OWLNamedIndividual>();
m_conceptInclusions=new ArrayList<OWLClassExpression[]>();
m_dataRangeInclusions=new ArrayList<OWLDataRange[]>();
m_simpleObjectPropertyInclusions=new ArrayList<OWLObjectPropertyExpression[]>();
m_complexObjectPropertyInclusions=new ArrayList<ComplexObjectPropertyInclusion>();
m_disjointObjectProperties=new ArrayList<OWLObjectPropertyExpression[]>();
m_reflexiveObjectProperties=new HashSet<OWLObjectPropertyExpression>();
m_irreflexiveObjectProperties=new HashSet<OWLObjectPropertyExpression>();
m_asymmetricObjectProperties=new HashSet<OWLObjectPropertyExpression>();
m_disjointDataProperties=new ArrayList<OWLDataPropertyExpression[]>();
m_dataPropertyInclusions=new ArrayList<OWLDataPropertyExpression[]>();
m_facts=new HashSet<OWLIndividualAxiom>();
m_hasKeys=new HashSet<OWLHasKeyAxiom>();
m_definedDatatypesIRIs=new HashSet<String>();
m_rules=new HashSet<DisjunctiveRule>();
}
开发者ID:evalincius,项目名称:Hermit_1.3.8_android,代码行数:23,代码来源:OWLAxioms.java
示例2: getSuperObjectProperties
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
private static Set<OWLObjectPropertyExpression> getSuperObjectProperties(OWLObjectPropertyExpression p, OWLReasoner reasoner, OWLOntology ont) {
if (reasoner != null) {
return reasoner.getSuperObjectProperties(p, false).getFlattened();
}
// Elk does not support this (sigh), so we do it ourselves
Set<OWLObjectPropertyExpression> sups = new HashSet<>();
Stack<OWLObjectPropertyExpression> seeds = new Stack<>();
seeds.add(p);
while (seeds.size() > 0) {
OWLObjectPropertyExpression nextp = seeds.pop();
Set<OWLObjectPropertyExpression> xset =
ont.getObjectSubPropertyAxiomsForSubProperty(nextp).stream().
map(a -> a.getSuperProperty()).collect(Collectors.toSet());
seeds.addAll(xset);
seeds.removeAll(sups);
sups.addAll(xset);
}
return sups;
}
开发者ID:owlcollab,项目名称:owltools,代码行数:21,代码来源:Mooncat.java
示例3: objectPropertyHierarchyNodeToNode
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
protected Node<OWLObjectPropertyExpression> objectPropertyHierarchyNodeToNode(
HierarchyNode<Role> hierarchyNode) {
Set<OWLObjectPropertyExpression> result = new HashSet<OWLObjectPropertyExpression>();
OWLDataFactory factory = getDataFactory();
for (Role role : hierarchyNode.getEquivalentElements()) {
if (role instanceof AtomicRole)
result.add(factory.getOWLObjectProperty(IRI
.create(((AtomicRole) role).getIRI())));
else {
OWLObjectPropertyExpression ope = factory
.getOWLObjectProperty(IRI.create(((InverseRole) role)
.getInverseOf().getIRI()));
result.add(factory.getOWLObjectInverseOf(ope));
}
}
return new OWLObjectPropertyNode(result);
}
开发者ID:evalincius,项目名称:Hermit_1.3.8_android,代码行数:18,代码来源:Reasoner.java
示例4: findEquivalentProperties
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
protected Map<OWLObjectPropertyExpression,Set<OWLObjectPropertyExpression>> findEquivalentProperties(Collection<OWLObjectPropertyExpression[]> simpleObjectPropertyInclusions) {
Graph<OWLObjectPropertyExpression> propertyDependencyGraph=new Graph<OWLObjectPropertyExpression>();
Map<OWLObjectPropertyExpression,Set<OWLObjectPropertyExpression>> equivalentObjectPropertiesMapping=new HashMap<OWLObjectPropertyExpression,Set<OWLObjectPropertyExpression>>();
for (OWLObjectPropertyExpression[] inclusion : simpleObjectPropertyInclusions)
if (!inclusion[0].equals(inclusion[1]) && !inclusion[0].equals(inclusion[1].getInverseProperty().getSimplified()))
propertyDependencyGraph.addEdge(inclusion[0],inclusion[1]);
propertyDependencyGraph.transitivelyClose();
for (OWLObjectPropertyExpression objExpr : propertyDependencyGraph.getElements()) {
if (propertyDependencyGraph.getSuccessors(objExpr).contains(objExpr) || propertyDependencyGraph.getSuccessors(objExpr).contains(objExpr.getInverseProperty().getSimplified())) {
Set<OWLObjectPropertyExpression> equivPropertiesSet=new HashSet<OWLObjectPropertyExpression>();
for (OWLObjectPropertyExpression succ : propertyDependencyGraph.getSuccessors(objExpr)) {
if (!succ.equals(objExpr) && (propertyDependencyGraph.getSuccessors(succ).contains(objExpr) || propertyDependencyGraph.getSuccessors(succ).contains(objExpr.getInverseProperty().getSimplified())))
equivPropertiesSet.add(succ);
}
equivalentObjectPropertiesMapping.put(objExpr,equivPropertiesSet);
}
}
return equivalentObjectPropertiesMapping;
}
开发者ID:evalincius,项目名称:Hermit_1.3.8_android,代码行数:20,代码来源:ObjectPropertyInclusionManager.java
示例5: trTypeLevel
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
/**
* @param p
* @return type-level form of relation
*/
private OWLObjectPropertyExpression trTypeLevel(
OWLObjectPropertyExpression p) {
if (!this.isTranslateObjectProperty) {
return p;
}
if (p instanceof OWLObjectInverseOf) {
OWLObjectPropertyExpression p2 = trTypeLevel(((OWLObjectInverseOf)p).getInverse());
return getOWLDataFactory().getOWLObjectInverseOf(p2);
}
else {
instanceLevelRelations.add((OWLObjectProperty)p);
IRI iri = ((OWLObjectProperty) p).getIRI();
return trTypeLevel(iri);
}
}
开发者ID:owlcollab,项目名称:owltools,代码行数:20,代码来源:OWLInAboxTranslator.java
示例6: isAsymmetric
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
protected boolean isAsymmetric(
OWLObjectPropertyExpression propertyExpression) {
checkPreConditions(propertyExpression);
if (!m_isConsistent)
return true;
OWLDataFactory factory = getDataFactory();
OWLIndividual freshIndividualA = factory
.getOWLAnonymousIndividual("fresh-individual-A");
OWLIndividual freshIndividualB = factory
.getOWLAnonymousIndividual("fresh-individual-B");
OWLAxiom assertion1 = factory.getOWLObjectPropertyAssertionAxiom(
propertyExpression, freshIndividualA, freshIndividualB);
OWLAxiom assertion2 = factory.getOWLObjectPropertyAssertionAxiom(
propertyExpression.getInverseProperty(), freshIndividualA,
freshIndividualB);
Tableau tableau = getTableau(assertion1, assertion2);
boolean result = tableau.isSatisfiable(true, null, null, null, null,
null, new ReasoningTaskDescription(true, "asymmetry of {0}",
H(propertyExpression)));
tableau.clearAdditionalDLOntology();
return !result;
}
开发者ID:evalincius,项目名称:Hermit_1.3.8_android,代码行数:23,代码来源:Reasoner.java
示例7: getObjectPropertyValues
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
public NodeSet<OWLNamedIndividual> getObjectPropertyValues(
OWLNamedIndividual namedIndividual,
OWLObjectPropertyExpression propertyExpression) {
checkPreConditions(namedIndividual, propertyExpression);
if (!m_isConsistent) {
Node<OWLNamedIndividual> node = new OWLNamedIndividualNode(
getAllNamedIndividuals());
return new OWLNamedIndividualNodeSet(Collections.singleton(node));
}
AtomicRole role = H(propertyExpression.getNamedProperty());
if (!m_dlOntology.containsObjectRole(role))
return new OWLNamedIndividualNodeSet();
initialisePropertiesInstanceManager();
Individual individual = H(namedIndividual);
Set<Individual> result;
if (propertyExpression.getSimplified().isAnonymous()) {
// inverse role
result = m_instanceManager.getObjectPropertySubjects(role,
individual);
} else {
// named role
result = m_instanceManager
.getObjectPropertyValues(role, individual);
}
return sortBySameAsIfNecessary(result);
}
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:27,代码来源:Reasoner.java
示例8: hasObjectPropertyRelationship
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
public boolean hasObjectPropertyRelationship(OWLNamedIndividual subject,
OWLObjectPropertyExpression propertyExpression,
OWLNamedIndividual object) {
checkPreConditions(subject, propertyExpression, object);
if (!m_isConsistent)
return true;
initialisePropertiesInstanceManager();
OWLObjectProperty property = propertyExpression.getNamedProperty();
if (propertyExpression.getSimplified().isAnonymous()) {
OWLNamedIndividual tmp = subject;
subject = object;
object = tmp;
}
AtomicRole role = H(property);
Individual subj = H(subject);
Individual obj = H(object);
return m_instanceManager.hasObjectRoleRelationship(role, subj, obj);
}
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:19,代码来源:Reasoner.java
示例9: shouldGetSubPropertyClosureOf
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
/**
* Test {@link OWLGraphWrapperEdgesExtended#getSubPropertyClosureOf(OWLObjectPropertyExpression)}.
*/
@Test
public void shouldGetSubPropertyClosureOf()
{
OWLObjectProperty fakeRel1 =
wrapper.getOWLObjectPropertyByIdentifier("fake_rel1");
List<OWLObjectProperty> expectedSubProps = new ArrayList<OWLObjectProperty>();
expectedSubProps.add(wrapper.getOWLObjectPropertyByIdentifier("fake_rel2"));
expectedSubProps.add(wrapper.getOWLObjectPropertyByIdentifier("fake_rel3"));
expectedSubProps.add(wrapper.getOWLObjectPropertyByIdentifier("fake_rel4"));
//fake_rel3 and fake_rel4 are sub-properties of fake_rel2,
//which is the sub-property of fake_rel1
//we also test the order of the returned properties
LinkedHashSet<OWLObjectPropertyExpression> subprops =
wrapper.getSubPropertyClosureOf(fakeRel1);
assertEquals("Incorrect sub-properties returned: ",
expectedSubProps, new ArrayList<OWLObjectPropertyExpression>(subprops));
}
开发者ID:owlcollab,项目名称:owltools,代码行数:22,代码来源:OWLGraphWrapperEdgesExtendedTest.java
示例10: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
public void visit(OWLSubPropertyChainOfAxiom axiom) {
List<OWLObjectPropertyExpression> subPropertyChain=axiom.getPropertyChain();
if (!containsBottomObjectProperty(subPropertyChain) && !axiom.getSuperProperty().isOWLTopObjectProperty()) {
OWLObjectPropertyExpression superObjectPropertyExpression=axiom.getSuperProperty();
if (subPropertyChain.size()==1)
addInclusion(subPropertyChain.get(0),superObjectPropertyExpression);
else if (subPropertyChain.size()==2 && subPropertyChain.get(0).equals(superObjectPropertyExpression) && subPropertyChain.get(1).equals(superObjectPropertyExpression))
makeTransitive(axiom.getSuperProperty());
else if (subPropertyChain.size()==0)
throw new IllegalArgumentException("Error: In OWL 2 DL, an empty property chain in property chain axioms is not allowd, but the ontology contains an axiom that the empty chain is a subproperty of "+superObjectPropertyExpression+".");
else {
OWLObjectPropertyExpression[] subObjectProperties=new OWLObjectPropertyExpression[subPropertyChain.size()];
subPropertyChain.toArray(subObjectProperties);
addInclusion(subObjectProperties,superObjectPropertyExpression);
}
}
for (OWLObjectPropertyExpression objectPropertyExpression : subPropertyChain)
m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(objectPropertyExpression.getNamedProperty());
m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getSuperProperty().getNamedProperty());
}
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:21,代码来源:OWLNormalization.java
示例11: increaseWithDefinedInverseIfNecessary
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
protected void increaseWithDefinedInverseIfNecessary(OWLObjectPropertyExpression propertyToBuildAutomatonFor,Automaton leafPropertyAutomaton,Map<OWLObjectPropertyExpression,Set<OWLObjectPropertyExpression>> inversePropertiesMap,Map<OWLObjectPropertyExpression,Automaton> individualAutomata) {
Set<OWLObjectPropertyExpression> inverses=inversePropertiesMap.get(propertyToBuildAutomatonFor);
if (inverses!=null) {
Automaton inversePropertyAutomaton=null;
for (OWLObjectPropertyExpression inverse : inverses) {
if (individualAutomata.containsKey(inverse) && !inverse.equals(propertyToBuildAutomatonFor)) {
inversePropertyAutomaton=individualAutomata.get(inverse);
increaseAutomatonWithInversePropertyAutomaton(leafPropertyAutomaton,inversePropertyAutomaton);
}
}
}
else if (individualAutomata.containsKey(propertyToBuildAutomatonFor.getInverseProperty().getSimplified())) {
Automaton autoOfInv_Role = individualAutomata.get(propertyToBuildAutomatonFor.getInverseProperty().getSimplified());
increaseAutomatonWithInversePropertyAutomaton(leafPropertyAutomaton,autoOfInv_Role);
}
}
开发者ID:evalincius,项目名称:Hermit_1.3.8_android,代码行数:17,代码来源:ObjectPropertyInclusionManager.java
示例12: visit
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
public void visit(OWLObjectComplementOf object) {
OWLClassExpression description=object.getOperand();
if (description instanceof OWLObjectHasSelf) {
OWLObjectPropertyExpression objectProperty=((OWLObjectHasSelf)description).getProperty();
Atom roleAtom=getRoleAtom(objectProperty,X,X);
m_bodyAtoms.add(roleAtom);
}
else if (description instanceof OWLObjectOneOf && ((OWLObjectOneOf)description).getIndividuals().size()==1) {
OWLIndividual individual=((OWLObjectOneOf)description).getIndividuals().iterator().next();
m_bodyAtoms.add(Atom.create(getConceptForNominal(individual),X));
}
else if (!(description instanceof OWLClass))
throw new IllegalStateException("Internal error: invalid normal form.");
else
m_bodyAtoms.add(Atom.create(AtomicConcept.create(((OWLClass)description).getIRI().toString()),X));
}
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:17,代码来源:OWLClausification.java
示例13: getRoleAtom
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
protected Atom getRoleAtom(OWLObjectPropertyExpression objectProperty,Term first,Term second) {
AtomicRole atomicRole;
objectProperty=objectProperty.getSimplified();
if (objectProperty.isAnonymous()) {
OWLObjectProperty internalObjectProperty=objectProperty.getNamedProperty();
atomicRole=AtomicRole.create(internalObjectProperty.getIRI().toString());
Term tmp=first;
first=second;
second=tmp;
}
else
atomicRole=AtomicRole.create(objectProperty.asOWLObjectProperty().getIRI().toString());
if (m_allAtomicObjectRoles.contains(atomicRole))
return Atom.create(atomicRole,first,second);
else
throw new IllegalArgumentException("Internal error: fresh properties in property assertions are not compatible with incremental ABox loading!");
}
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:18,代码来源:ReducedABoxOnlyClausification.java
示例14: getPropertyChainMap
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
private Map<OWLObjectProperty,Set<List<OWLObjectProperty>>> getPropertyChainMap() {
if (pcMap == null) {
pcMap = new HashMap<OWLObjectProperty,Set<List<OWLObjectProperty>>>();
for (OWLSubPropertyChainOfAxiom a : sourceOntology.getAxioms(AxiomType.SUB_PROPERTY_CHAIN_OF)) {
//LOG.info("CHAIN:"+a+" // "+a.getPropertyChain().size());
if (a.getPropertyChain().size() == 2) {
OWLObjectPropertyExpression p1 = a.getPropertyChain().get(0);
OWLObjectPropertyExpression p2 = a.getPropertyChain().get(1);
//LOG.info(" xxCHAIN:"+p1+" o "+p2);
if (p1 instanceof OWLObjectProperty && p2 instanceof OWLObjectProperty) {
List<OWLObjectProperty> list = new Vector<OWLObjectProperty>();
list.add((OWLObjectProperty) p2);
list.add((OWLObjectProperty) a.getSuperProperty());
if (!pcMap.containsKey(p1))
pcMap.put((OWLObjectProperty) p1, new HashSet<List<OWLObjectProperty>>());
pcMap.get((OWLObjectProperty) p1).add(list);
//LOG.info(" xxxCHAIN:"+p1+" ... "+list);
}
}
else {
// TODO
}
}
}
return pcMap;
}
开发者ID:owlcollab,项目名称:owltools,代码行数:27,代码来源:OWLGraphWrapperEdges.java
示例15: getStrings
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
/**
* Returns the URIs of a list of object properties.
*
* @param properties object properties
* @return list of URIs
*/
protected static List<String> getStrings(List<OWLObjectPropertyExpression> properties) {
List<String> strs = new ArrayList<>();
for (OWLObjectPropertyExpression op : properties) {
strs.add(getString(op));
}
return strs;
}
开发者ID:lszeremeta,项目名称:neo4j-sparql-extension-yars,代码行数:14,代码来源:AbstractExtractor.java
示例16: getObjectPropertyExpressions
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
@Override
public List<? extends ElkObjectPropertyExpression> getObjectPropertyExpressions() {
List<ElkObjectPropertyExpression> result = new ArrayList<ElkObjectPropertyExpression>();
for (OWLObjectPropertyExpression ope : this.owlObject.getProperties()) {
result.add(converter.convert(ope));
}
return result;
}
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:9,代码来源:ElkDisjointObjectPropertiesAxiomWrap.java
示例17: expandPropertyChain
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
public OWLClassExpression expandPropertyChain(List<OWLObjectPropertyExpression> chain, OWLClassExpression t) {
OWLClassExpression x = t;
for (int i = chain.size()-1; i>=0; i--) {
x = this.owlDataFactory.getOWLObjectSomeValuesFrom(chain.get(i),t);
t = x;
}
return x;
}
开发者ID:owlcollab,项目名称:owltools,代码行数:9,代码来源:PropertyViewOntologyBuilder.java
示例18: removeType
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
void removeType(ModelContainer model,
OWLIndividual i,
OWLObjectPropertyExpression p,
OWLClassExpression filler,
METADATA metadata) {
OWLDataFactory f = model.getOWLDataFactory();
OWLClassAssertionAxiom axiom = f.getOWLClassAssertionAxiom(f.getOWLObjectSomeValuesFrom(p, filler), i);
removeAxiom(model, axiom, metadata);
}
开发者ID:geneontology,项目名称:minerva,代码行数:10,代码来源:CoreMolecularModelManager.java
示例19: getReachableOWLClasses
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
private boolean getReachableOWLClasses(OWLClassExpression c, Set<OWLClassExpression> elts) {
if (c instanceof OWLObjectIntersectionOf) {
for (OWLClassExpression x : ((OWLObjectIntersectionOf)c).getOperands()) {
if (x instanceof OWLClass) {
elts.add((OWLClass) x);
}
else if (x instanceof OWLObjectSomeValuesFrom) {
OWLObjectPropertyExpression p = ((OWLObjectSomeValuesFrom)x).getProperty();
String pLabel = getGraph().getLabel(p);
if (pLabel != null && pLabel.contains("regulates")) {
// fairly hacky:
// fail on this for now - no inference for regulates
//elts.add(x);
return false;
}
else {
OWLClassExpression filler = ((OWLObjectSomeValuesFrom)x).getFiller();
if (!getReachableOWLClasses( filler, elts)) {
return false;
}
}
}
else {
return false;
}
}
return true;
}
else if (c instanceof OWLClass) {
elts.add((OWLClass) c);
return true;
}
return false;
}
开发者ID:owlcollab,项目名称:owltools,代码行数:36,代码来源:CompositionalClassPredictor.java
示例20: rewriteNegativeObjectPropertyAssertions
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; //导入依赖的package包/类
public int rewriteNegativeObjectPropertyAssertions(OWLDataFactory factory,OWLAxioms axioms,int replacementIndex) {
// now object property inclusion manager added all non-simple properties to axioms.m_complexObjectPropertyExpressions
// now that we know which roles are non-simple, we can decide which negative object property assertions have to be
// expressed as concept assertions so that transitivity rewriting applies properly. All new concepts for the concept
// assertions must be normalised, because we are done with the normal normalisation phase.
Set<OWLIndividualAxiom> redundantFacts=new HashSet<OWLIndividualAxiom>();
Set<OWLIndividualAxiom> additionalFacts=new HashSet<OWLIndividualAxiom>();
for (OWLIndividualAxiom axiom : axioms.m_facts) {
if (axiom instanceof OWLNegativeObjectPropertyAssertionAxiom) {
OWLNegativeObjectPropertyAssertionAxiom negAssertion=(OWLNegativeObjectPropertyAssertionAxiom)axiom;
OWLObjectPropertyExpression prop=negAssertion.getProperty().getSimplified();
if (axioms.m_complexObjectPropertyExpressions.contains(prop)) {
// turn not op(a b) into
// C(a) and not C or forall op not{b}
OWLIndividual individual=negAssertion.getObject();
// neg. op assertions cannot contain anonymous individuals
OWLClass individualConcept=factory.getOWLClass(IRI.create("internal:nom#"+individual.asOWLNamedIndividual().getIRI().toString()));
OWLClassExpression notIndividualConcept=factory.getOWLObjectComplementOf(individualConcept);
OWLClassExpression allNotIndividualConcept=factory.getOWLObjectAllValuesFrom(prop,notIndividualConcept);
OWLClassExpression definition=factory.getOWLClass(IRI.create("internal:def#"+(replacementIndex++)));
axioms.m_conceptInclusions.add(new OWLClassExpression[] { factory.getOWLObjectComplementOf(definition), allNotIndividualConcept });
additionalFacts.add(factory.getOWLClassAssertionAxiom(definition,negAssertion.getSubject()));
additionalFacts.add(factory.getOWLClassAssertionAxiom(individualConcept,individual));
redundantFacts.add(negAssertion);
}
}
}
axioms.m_facts.addAll(additionalFacts);
axioms.m_facts.removeAll(redundantFacts);
return replacementIndex;
}
开发者ID:evalincius,项目名称:Hermit_1.3.8_android,代码行数:32,代码来源:ObjectPropertyInclusionManager.java
注:本文中的org.semanticweb.owlapi.model.OWLObjectPropertyExpression类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论