本文整理汇总了Java中org.semanticweb.owlapi.reasoner.FreshEntitiesException类的典型用法代码示例。如果您正苦于以下问题:Java FreshEntitiesException类的具体用法?Java FreshEntitiesException怎么用?Java FreshEntitiesException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FreshEntitiesException类属于org.semanticweb.owlapi.reasoner包,在下文中一共展示了FreshEntitiesException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getDisjointDataProperties
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
@Override
public NodeSet<OWLDataProperty> getDisjointDataProperties(
OWLDataPropertyExpression arg0)
throws InconsistentOntologyException, FreshEntitiesException,
ReasonerInterruptedException, TimeOutException {
LOGGER_.trace("getDisjointDataProperties(OWLDataPropertyExpression)");
checkInterrupted();
// TODO Provide implementation
throw unsupportedOwlApiMethod(
"getDisjointDataProperties(OWLDataPropertyExpression)");
}
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:13,代码来源:ElkReasoner.java
示例2: getSuperClassExpressions
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
/**
* note that this is not a standard reasoner method
*
* @param ce
* @param direct
* @return all superclasses, where superclasses can include anon class expressions
* @throws InconsistentOntologyException
* @throws ClassExpressionNotInProfileException
* @throws FreshEntitiesException
* @throws ReasonerInterruptedException
* @throws TimeOutException
*/
public Set<OWLClassExpression> getSuperClassExpressions(OWLClassExpression ce,
boolean direct) throws InconsistentOntologyException,
ClassExpressionNotInProfileException, FreshEntitiesException,
ReasonerInterruptedException, TimeOutException {
Set<OWLClassExpression> result = new HashSet<OWLClassExpression>();
Set<OWLObject> supers = gw.getSubsumersFromClosure(ce);
for (OWLObject sup : supers) {
if (sup instanceof OWLClassExpression) {
result.add((OWLClassExpression) sup);
}
else {
}
}
return result;
}
开发者ID:owlcollab,项目名称:owltools,代码行数:30,代码来源:GraphReasoner.java
示例3: getSuperClasses
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce,
boolean direct) throws InconsistentOntologyException,
ClassExpressionNotInProfileException, FreshEntitiesException,
ReasonerInterruptedException, TimeOutException {
DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
Set<OWLObject> supers = gw.getSubsumersFromClosure(ce);
for (OWLObject sup : supers) {
if (sup instanceof OWLClassExpression) {
if (sup instanceof OWLClass) {
result.addEntity((OWLClass) sup);
}
else {
}
}
else {
}
}
return result;
}
开发者ID:owlcollab,项目名称:owltools,代码行数:23,代码来源:GraphReasoner.java
示例4: getInstances
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public NodeSet<OWLNamedIndividual> getInstances(OWLClassExpression ce,
boolean direct) throws InconsistentOntologyException,
ClassExpressionNotInProfileException, FreshEntitiesException,
ReasonerInterruptedException, TimeOutException {
DefaultNodeSet<OWLNamedIndividual> result = new OWLNamedIndividualNodeSet();
Set<OWLObject> subs = gw.queryDescendants(ce, true, true);
for (OWLObject s : subs) {
if (s instanceof OWLNamedIndividual) {
result.addEntity((OWLNamedIndividual) s);
}
else {
}
}
return result;
}
开发者ID:owlcollab,项目名称:owltools,代码行数:17,代码来源:GraphReasoner.java
示例5: findAncestors
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
protected Set<OWLClass> findAncestors(String expr,
OWLObjectProperty p, boolean direct, Integer numExpected) throws TimeOutException, FreshEntitiesException, InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, OWLParserException {
System.out.println("Query: "+expr+" "+p+" Direct="+direct);
OWLClassExpression qc = parseOMN(expr);
System.out.println("QueryC: "+qc);
//Set<OWLClassExpression> ces = reasoner.getSuperClassExpressions(qc, false);
//System.out.println("NumX:"+ces.size());
Set<OWLClass> clzs = reasoner.getSuperClassesOver(qc, p, direct);
System.out.println("NumD:"+clzs.size());
for (OWLClass c : clzs) {
System.out.println(" D:"+c);
}
if (numExpected != null) {
assertEquals(numExpected.intValue(), clzs.size());
}
return clzs;
}
开发者ID:owlcollab,项目名称:owltools,代码行数:18,代码来源:ExtendedReasonerTest.java
示例6: getDisjointObjectProperties
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
@Override
public NodeSet<OWLObjectPropertyExpression> getDisjointObjectProperties(
OWLObjectPropertyExpression objectPropertyExpression) throws InconsistentOntologyException,
FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
Objects.requireNonNull(objectPropertyExpression);
logger.finer("getDisjointDataProperties(" + objectPropertyExpression + ")");
NodeSet<OWLObjectPropertyExpression> ret = getTranslator().translateSSOPE(
getReasoner().getDisjointObjectProperties(getTranslator().translateOPE(objectPropertyExpression)));
logger.finer("" + ret);
return ret;
}
开发者ID:julianmendez,项目名称:jcel,代码行数:12,代码来源:JcelReasoner.java
示例7: isEntailed
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public boolean isEntailed(Set<? extends OWLAxiom> axioms) throws ReasonerInterruptedException, UnsupportedEntailmentTypeException, TimeOutException, AxiomNotInProfileException, FreshEntitiesException, InconsistentOntologyException {
for (OWLAxiom ax : axioms) {
if (!getRootOntology().containsAxiomIgnoreAnnotations(ax, true)) {
return false;
}
}
return true;
}
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:9,代码来源:StructuralReasoner2.java
示例8: getSubClasses
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
OWLClassNodeSet ns = new OWLClassNodeSet();
if (!ce.isAnonymous()) {
ensurePrepared();
return classHierarchyInfo.getNodeHierarchyChildren(ce.asOWLClass(), direct, ns);
}
return ns;
}
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:9,代码来源:StructuralReasoner2.java
示例9: getSuperClasses
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
OWLClassNodeSet ns = new OWLClassNodeSet();
if (!ce.isAnonymous()) {
ensurePrepared();
return classHierarchyInfo.getNodeHierarchyParents(ce.asOWLClass(), direct, ns);
}
return ns;
}
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:9,代码来源:StructuralReasoner2.java
示例10: getObjectPropertyRanges
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
@Override
public NodeSet<OWLClass> getObjectPropertyRanges(OWLObjectPropertyExpression objectPropertyExpression,
boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException,
TimeOutException {
Objects.requireNonNull(objectPropertyExpression);
logger.finer("getObjectPropertyRanges(" + objectPropertyExpression + ", " + direct + ")");
throw new UnsupportedReasonerOperationInBornException(
"Unsupported operation : getObjectPropertyRanges(OWLObjectPropertyExpression, boolean)");
}
开发者ID:julianmendez,项目名称:born,代码行数:10,代码来源:BornReasoner.java
示例11: getTypes
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
@Override
public NodeSet<OWLClass> getTypes(OWLNamedIndividual individual, boolean direct)
throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException,
TimeOutException {
Objects.requireNonNull(individual);
logger.finer("getTypes(" + individual + ", " + direct + ")");
throw new UnsupportedReasonerOperationInBornException(
"Unsupported operation : getTypes(OWLNamedIndividual, boolean)");
}
开发者ID:julianmendez,项目名称:born,代码行数:10,代码来源:BornReasoner.java
示例12: getObjectPropertyValues
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
@Override
public NodeSet<OWLNamedIndividual> getObjectPropertyValues(OWLNamedIndividual individual,
OWLObjectPropertyExpression objectPropertyExpression) throws InconsistentOntologyException,
FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
Objects.requireNonNull(individual);
Objects.requireNonNull(objectPropertyExpression);
logger.finer("getObjectPropertyValues(" + individual + ", " + objectPropertyExpression + ")");
throw new UnsupportedReasonerOperationInBornException(
"Unsupported operation : getObjectPropertyValues(OWLNamedIndividual)");
}
开发者ID:julianmendez,项目名称:born,代码行数:11,代码来源:BornReasoner.java
示例13: getDisjointDataProperties
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public NodeSet<OWLDataProperty> getDisjointDataProperties(OWLDataPropertyExpression pe) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
ensurePrepared();
DefaultNodeSet<OWLDataProperty> result = new OWLDataPropertyNodeSet();
for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
for (OWLDisjointDataPropertiesAxiom axiom : ontology.getDisjointDataPropertiesAxioms(pe.asOWLDataProperty())) {
for (OWLDataPropertyExpression dpe : axiom.getPropertiesMinus(pe)) {
if (!dpe.isAnonymous()) {
result.addNode(dataPropertyHierarchyInfo.getEquivalents(dpe.asOWLDataProperty()));
result.addAllNodes(getSubDataProperties(dpe.asOWLDataProperty(), false).getNodes());
}
}
}
}
return result;
}
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:16,代码来源:StructuralReasoner2.java
示例14: getDataPropertyDomains
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
ensurePrepared();
DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
for (OWLDataPropertyDomainAxiom axiom : ontology.getDataPropertyDomainAxioms(pe)) {
result.addNode(getEquivalentClasses(axiom.getDomain()));
if (!direct) {
result.addAllNodes(getSuperClasses(axiom.getDomain(), false).getNodes());
}
}
}
return result;
}
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:14,代码来源:StructuralReasoner2.java
示例15: isEntailed
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
@Override
public boolean isEntailed(OWLAxiom axiom) throws ReasonerInterruptedException, UnsupportedEntailmentTypeException,
TimeOutException, AxiomNotInProfileException, FreshEntitiesException {
Objects.requireNonNull(axiom);
logger.finer("isEntailed((OWLAxiom) " + axiom + ")");
boolean ret = getReasoner().isEntailed(getTranslator().translateSA(Collections.singleton(axiom)));
logger.finer("" + ret);
return ret;
}
开发者ID:julianmendez,项目名称:jcel,代码行数:10,代码来源:JcelReasoner.java
示例16: getInstances
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public NodeSet<OWLNamedIndividual> getInstances(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
ensurePrepared();
DefaultNodeSet<OWLNamedIndividual> result = new OWLNamedIndividualNodeSet();
if (!ce.isAnonymous()) {
OWLClass cls = ce.asOWLClass();
Set<OWLClass> clses = new HashSet<OWLClass>();
clses.add(cls);
if (!direct) {
clses.addAll(getSubClasses(cls, false).getFlattened());
}
for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
for (OWLClass curCls : clses) {
for (OWLClassAssertionAxiom axiom : ontology.getClassAssertionAxioms(curCls)) {
OWLIndividual individual = axiom.getIndividual();
if (!individual.isAnonymous()) {
if (getIndividualNodeSetPolicy().equals(IndividualNodeSetPolicy.BY_SAME_AS)) {
result.addNode(getSameIndividuals(individual.asOWLNamedIndividual()));
}
else {
result.addNode(new OWLNamedIndividualNode(individual.asOWLNamedIndividual()));
}
}
}
}
}
}
return result;
}
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:29,代码来源:StructuralReasoner2.java
示例17: isEntailed
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
@Override
public boolean isEntailed(Set<? extends OWLAxiom> axiomSet) throws ReasonerInterruptedException,
UnsupportedEntailmentTypeException, TimeOutException, AxiomNotInProfileException, FreshEntitiesException {
Objects.requireNonNull(axiomSet);
logger.finer("isEntailed((Set<? extends OWLAxiom>) " + axiomSet + ")");
throw new UnsupportedReasonerOperationInBornException(
"Unsupported operation : isEntailed(Set<? extends OWLAxiom>)");
}
开发者ID:julianmendez,项目名称:born,代码行数:9,代码来源:BornReasoner.java
示例18: getSameIndividuals
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
public Node<OWLNamedIndividual> getSameIndividuals(OWLNamedIndividual ind) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
ensurePrepared();
Set<OWLNamedIndividual> inds = new HashSet<OWLNamedIndividual>();
Set<OWLSameIndividualAxiom> processed = new HashSet<OWLSameIndividualAxiom>();
List<OWLNamedIndividual> stack = new ArrayList<OWLNamedIndividual>();
stack.add(ind);
while (!stack.isEmpty()) {
OWLNamedIndividual currentInd = stack.remove(0);
for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
for (OWLSameIndividualAxiom axiom : ontology.getSameIndividualAxioms(currentInd)) {
if (!processed.contains(axiom)) {
processed.add(axiom);
for (OWLIndividual i : axiom.getIndividuals()) {
if (!i.isAnonymous()) {
OWLNamedIndividual namedInd = i.asOWLNamedIndividual();
if (!inds.contains(namedInd)) {
inds.add(namedInd);
stack.add(namedInd);
}
}
}
}
}
}
}
return new OWLNamedIndividualNode(inds);
}
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:29,代码来源:StructuralReasoner2.java
示例19: throwFreshEntityExceptionIfNecessary
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
protected void throwFreshEntityExceptionIfNecessary(OWLObject... objects) {
if (m_configuration.freshEntityPolicy == FreshEntityPolicy.DISALLOW) {
Set<OWLEntity> undeclaredEntities = new HashSet<OWLEntity>();
for (OWLObject object : objects) {
if (!(object instanceof OWLEntity)
|| !((OWLEntity) object).isBuiltIn()) {
for (OWLDataProperty dp : object
.getDataPropertiesInSignature())
if (!isDefined(dp)
&& !Prefixes.isInternalIRI(dp.getIRI()
.toString()))
undeclaredEntities.add(dp);
for (OWLObjectProperty op : object
.getObjectPropertiesInSignature())
if (!isDefined(op)
&& !Prefixes.isInternalIRI(op.getIRI()
.toString()))
undeclaredEntities.add(op);
for (OWLNamedIndividual individual : object
.getIndividualsInSignature())
if (!isDefined(individual)
&& !Prefixes.isInternalIRI(individual.getIRI()
.toString()))
undeclaredEntities.add(individual);
for (OWLClass owlClass : object.getClassesInSignature())
if (!isDefined(owlClass)
&& !Prefixes.isInternalIRI(owlClass.getIRI()
.toString()))
undeclaredEntities.add(owlClass);
}
}
if (!undeclaredEntities.isEmpty())
throw new FreshEntitiesException(undeclaredEntities);
}
}
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:36,代码来源:Reasoner.java
示例20: getClassNode
import org.semanticweb.owlapi.reasoner.FreshEntitiesException; //导入依赖的package包/类
private Node<OWLClass> getClassNode(ElkClass elkClass)
throws FreshEntitiesException, InconsistentOntologyException,
ElkException {
try {
return elkConverter_
.convertClassNode(reasoner_.getEquivalentClasses(elkClass));
} catch (ElkException e) {
throw elkConverter_.convert(e);
}
}
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:11,代码来源:ElkReasoner.java
注:本文中的org.semanticweb.owlapi.reasoner.FreshEntitiesException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论