• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java OWLDataOneOf类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.semanticweb.owlapi.model.OWLDataOneOf的典型用法代码示例。如果您正苦于以下问题:Java OWLDataOneOf类的具体用法?Java OWLDataOneOf怎么用?Java OWLDataOneOf使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OWLDataOneOf类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLDataOneOf类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public OWLDataRange visit(OWLDataOneOf node) {
    if (node.getValues().size() == 1) {
        if (negated) {
            return dataFactory.getOWLDataComplementOf(node);
        } else {
            return node;
        }
    } else {
        // Encode as a data union of and return result
        Set<OWLDataOneOf> oneOfs = new HashSet<>();
        for (OWLLiteral lit : node.getValues()) {
            oneOfs.add(dataFactory.getOWLDataOneOf(lit));
        }
        return dataFactory.getOWLDataUnionOf(oneOfs).accept(this);
    }
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:18,代码来源:NNF.java


示例2: addToOntology

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDatatype datatype = factory.getOWLDatatype(":DataOneOf", pm);

  OWLLiteral l1 = factory.getOWLLiteral("DataOneOf_Literal1");
  OWLLiteral l2 = factory.getOWLLiteral("DataOneOf_Literal2");
  OWLLiteral l3 = factory.getOWLLiteral("DataOneOf_Literal3");

  OWLDataOneOf owlDataOneOf = factory.getOWLDataOneOf(l1, l2, l3);
  addAxiomToOntology(factory.getOWLDatatypeDefinitionAxiom(datatype, owlDataOneOf));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataOneOfFeature.java


示例3: addToOntology

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDatatype datatype = factory.getOWLDatatype(":DataOneOf_EL", pm);
  OWLLiteral singleLiteral = factory.getOWLLiteral("DataOneOf_EL_Literal1");
  OWLDataOneOf owlDataOneOf = factory.getOWLDataOneOf(singleLiteral);

  addAxiomToOntology(factory.getOWLDatatypeDefinitionAxiom(datatype, owlDataOneOf));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:9,代码来源:OwlDataOneOfOwl2ELFeature.java


示例4: getClass2DataProperty2LiteralAxioms

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
/**
 * create axioms for class--dataproperty----literal relation.
 * 
 * @param src
 * @param dataprop
 * @param dest
 * @return
 */
private void getClass2DataProperty2LiteralAxioms(OWLClass src, OWLDataProperty dataprop, OWLLiteral dest) {
	// Set<OWLAxiom> tmpaxioms = new HashSet<OWLAxiom>();
	OWLAxiom axiom;
	OWLDataSomeValuesFrom owlDataSomeValuesFrom;
	OWLDataHasValue owlLDataHasValue;
	OWLDataMaxCardinality owlDataMaxCardinality;
	OWLDataOneOf owldataOneOf;

	// set domain and range
	// scoped domain
	if (editor.isGenerateDomainAxiom()) {
		owlLDataHasValue = owlDataFactory.getOWLDataHasValue(dataprop, dest);
		axiom = owlDataFactory.getOWLSubClassOfAxiom(owlLDataHasValue, src);
		domainAndRangeAxioms.add(axiom);

		owlDataSomeValuesFrom = owlDataFactory.getOWLDataSomeValuesFrom(dataprop, owlDataFactory.getTopDatatype());
		axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataSomeValuesFrom, src);
		domainAndRangeAxioms.add(axiom);
	}

	if (editor.isGenerateCardinalityAxiom()) {
		owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop,
				owlDataFactory.getTopDatatype());
		axiom = owlDataFactory.getOWLSubClassOfAxiom(owlDataFactory.getOWLThing(), owlDataMaxCardinality);
		cardinalityAxioms.add(axiom);

		// need to verify with Adila
		owlDataMaxCardinality = owlDataFactory.getOWLDataMaxCardinality(1, dataprop,
				owlDataFactory.getTopDatatype());
		axiom = owlDataFactory.getOWLSubClassOfAxiom(src, owlDataMaxCardinality);
		cardinalityAxioms.add(axiom);
	}
	// return tmpaxioms;
}
 
开发者ID:md-k-sarker,项目名称:OWLAx,代码行数:43,代码来源:IntegrateOntologyWithProtege.java


示例5: axiomatizeTopDataProperty

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
protected void axiomatizeTopDataProperty(OWLAxioms axioms) {
    OWLDatatype anonymousConstantsDatatype=m_factory.getOWLDatatype(IRI.create("internal:anonymous-constants"));
    OWLLiteral newConstant=m_factory.getOWLLiteral("internal:constant",anonymousConstantsDatatype);
    OWLDataOneOf oneOfNewConstant=m_factory.getOWLDataOneOf(newConstant);
    OWLDataSomeValuesFrom hasTopNewConstant=m_factory.getOWLDataSomeValuesFrom(m_topDataProperty,oneOfNewConstant);
    axioms.m_conceptInclusions.add(new OWLClassExpression[] { hasTopNewConstant });
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:8,代码来源:BuiltInPropertyManager.java


示例6: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
public void visit(OWLClassAssertionAxiom axiom) {
    OWLClassExpression classExpression=axiom.getClassExpression();
    if (classExpression instanceof OWLDataHasValue) {
        OWLDataHasValue hasValue=(OWLDataHasValue)classExpression;
        addFact(m_factory.getOWLDataPropertyAssertionAxiom(hasValue.getProperty(), axiom.getIndividual(), hasValue.getValue()));
        return;
    }
    if (classExpression instanceof OWLDataSomeValuesFrom) {
        OWLDataSomeValuesFrom someValuesFrom=(OWLDataSomeValuesFrom)classExpression;
        OWLDataRange dataRange=someValuesFrom.getFiller();
        if (dataRange instanceof OWLDataOneOf) {
            OWLDataOneOf oneOf=(OWLDataOneOf)dataRange;
            if (oneOf.getValues().size()==1) {
                addFact(m_factory.getOWLDataPropertyAssertionAxiom(someValuesFrom.getProperty(),axiom.getIndividual(),oneOf.getValues().iterator().next()));
                return;
            }
        }
    }
    classExpression=positive(classExpression);
    if (!isSimple(classExpression)) {
        OWLClassExpression definition=getDefinitionFor(classExpression,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { negative(definition),classExpression });
        classExpression=definition;
    }
    addFact(m_factory.getOWLClassAssertionAxiom(classExpression,axiom.getIndividual()));
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:28,代码来源:OWLNormalization.java


示例7: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
public Object visit(OWLDataOneOf object) {
    Set<Constant> constants=new HashSet<Constant>();
    for (OWLLiteral literal : object.getValues())
        constants.add((Constant)literal.accept(this));
    Constant[] constantsArray=new Constant[constants.size()];
    constants.toArray(constantsArray);
    return ConstantEnumeration.create(constantsArray);
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:9,代码来源:OWLClausification.java


示例8: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
public void visit(OWLClassAssertionAxiom axiom) {
	OWLClassExpression classExpression=axiom.getClassExpression();
	if (classExpression instanceof OWLDataHasValue) {
        OWLDataHasValue hasValue=(OWLDataHasValue)classExpression;
        addFact(m_factory.getOWLDataPropertyAssertionAxiom(hasValue.getProperty(), axiom.getIndividual(), hasValue.getValue()));
        return;
    }
    if (classExpression instanceof OWLDataSomeValuesFrom) {
        OWLDataSomeValuesFrom someValuesFrom=(OWLDataSomeValuesFrom)classExpression;
        OWLDataRange dataRange=someValuesFrom.getFiller();
        if (dataRange instanceof OWLDataOneOf) {
            OWLDataOneOf oneOf=(OWLDataOneOf)dataRange;
            if (oneOf.getValues().size()==1) {
                addFact(m_factory.getOWLDataPropertyAssertionAxiom(someValuesFrom.getProperty(),axiom.getIndividual(),oneOf.getValues().iterator().next()));
                return;
            }
        }
    }
    classExpression=positive(classExpression);
    if (!isSimple(classExpression)) {
        OWLClassExpression definition=getDefinitionFor(classExpression,m_alreadyExists);
        if (!m_alreadyExists[0])
            m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { negative(definition),classExpression });
        classExpression=definition;
    }
    addFact(m_factory.getOWLClassAssertionAxiom(classExpression,axiom.getIndividual()));
}
 
开发者ID:wolpertinger-reasoner,项目名称:Wolpertinger,代码行数:28,代码来源:OWLNormalization.java


示例9: isAtomic

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
protected static boolean isAtomic(OWLDataRange dr) {
    return dr instanceof OWLDatatype || dr instanceof OWLDatatypeRestriction || dr instanceof OWLDataOneOf;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:OWLNormalization.java


示例10: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
public OWLDataRange visit(OWLDataOneOf o) {
    return o;
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:4,代码来源:ExpressionManager.java


示例11: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public OWLDataOneOf visit(ElkDataOneOf expression) {
	return owlFactory_
			.getOWLDataOneOf(toLiteralSet(expression.getLiterals()));
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:6,代码来源:AbstractElkObjectConverter.java


示例12: convert

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@SuppressWarnings("static-method")
public ElkDataOneOf convert(OWLDataOneOf owlDataOneOf) {
	return new ElkDataOneOfWrap<OWLDataOneOf>(owlDataOneOf);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:5,代码来源:OwlConverter.java


示例13: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public ElkDataOneOf visit(OWLDataOneOf owlDataOneOf) {
	return CONVERTER.convert(owlDataOneOf);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:5,代码来源:OwlDataRangeConverterVisitor.java


示例14: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public O visit(OWLDataOneOf node) {
    return doDefault(node);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:5,代码来源:OWLDataVisitorExAdapter.java


示例15: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public void visit(OWLDataOneOf node) {
    handleDefault(node);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:5,代码来源:OWLObjectVisitorAdapter.java


示例16: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public void visit(OWLDataOneOf node) {
    type = DATA_TYPE_INDEX_BASE + 3;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:5,代码来源:OWLObjectTypeIndexProvider.java


示例17: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public void visit(OWLDataOneOf node) {
    hashCode = primes[52];
    hashCode = hashCode * MULT + node.getValues().hashCode();
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:6,代码来源:HashCode.java


示例18: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
@Override
public void visit(@Nonnull OWLDataOneOf node) {
    for (OWLLiteral val : node.getValues()) {
        val.accept(this);
    }
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:7,代码来源:AbstractEntityRegistrationManager.java


示例19: visit

import org.semanticweb.owlapi.model.OWLDataOneOf; //导入依赖的package包/类
public Object visit(OWLDataOneOf node) {
     if (node.getValues().size() != 1) {
profileViolations.add(new UseOfDataOneOfWithMultipleLiterals(getCurrentOntology(), getCurrentAxiom(), node));
     }
     return null;
   }
 
开发者ID:ag-csw,项目名称:SVoNt,代码行数:7,代码来源:PelletOWL2ELProfile.java



注:本文中的org.semanticweb.owlapi.model.OWLDataOneOf类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PathList类代码示例发布时间:2022-05-22
下一篇:
Java DayOfWeek类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap