当前位置: 首页>>代码示例>>Java>>正文


Java OWLDataProperty类代码示例

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


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

示例1: removeDataProperty

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
public void removeDataProperty(ModelContainer model,
		OWLNamedIndividual i, OWLDataProperty prop, OWLLiteral literal,
		METADATA metadata) {
	OWLAxiom toRemove = null;
	Set<OWLDataPropertyAssertionAxiom> existing = model.getAboxOntology().getDataPropertyAssertionAxioms(i);
	for (OWLDataPropertyAssertionAxiom ax : existing) {
		if (prop.equals(ax.getProperty()) && literal.equals(ax.getObject())) {
			toRemove = ax;
			break;
		}
	}
	
	if (toRemove != null) {
		removeAxiom(model, toRemove, metadata);
	}
}
 
开发者ID:geneontology,项目名称:minerva,代码行数:17,代码来源:CoreMolecularModelManager.java

示例2: OWLAxioms

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的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

示例3: hasDataPropertyRelationship

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
public boolean hasDataPropertyRelationship(OWLNamedIndividual subject,
		OWLDataProperty property, OWLLiteral object) {
	checkPreConditions(subject, property);
	if (!m_isConsistent)
		return true;
	OWLDataFactory factory = getDataFactory();
	OWLAxiom notAssertion = factory
			.getOWLNegativeDataPropertyAssertionAxiom(property, subject,
					object);
	Tableau tableau = getTableau(notAssertion);
	boolean result = tableau.isSatisfiable(true, true, null, null, null,
			null, null, new ReasoningTaskDescription(true,
					"is {0} connected to {1} via {2}", H(subject), object,
					H(property)));
	tableau.clearAdditionalDLOntology();
	return !result;
}
 
开发者ID:evalincius,项目名称:Hermit_1.3.8_android,代码行数:18,代码来源:Reasoner.java

示例4: SKOSDataPropertyAssertionsFrame

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
public SKOSDataPropertyAssertionsFrame(OWLEditorKit owlEditorKit) {
        super(owlEditorKit.getModelManager().getOWLOntologyManager());
        Set<OWLDataProperty> filterProps = new HashSet<OWLDataProperty>(7);

//        addSection(new SKOSDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.PREFLABEL.getIRI()), "SKOS preferred label"));
//        filterProps.add(owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.PREFLABEL.getIRI()));
        addSection(new SKOSDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.NOTATION  .getIRI()), "SKOS notation"));
        filterProps.add(owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.NOTATION.getIRI()));
//        addSection(new SKOSDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.ALTLABEL.getIRI()), "SKOS alternate label"));
//        filterProps.add(owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.ALTLABEL.getIRI()));
//        addSection(new SKOSDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.HIDDENLABEL.getIRI()), "SKOS hidden label"));
//        filterProps.add(owlEditorKit.getModelManager().getOWLDataFactory().getOWLDataProperty(SKOSVocabulary.HIDDENLABEL.getIRI()));
        addSection(new SKOSOtherDataPropertyAssertionAxiomFrameSection(owlEditorKit, this, filterProps));

//        addSection(new OWLDataPropertyAssertionAxiomFrameSection(owlEditorKit, this));
//        addSection(new OWLNegativeObjectPropertyAssertionFrameSection(owlEditorKit, this));
//        addSection(new OWLNegativeDataPropertyAssertionFrameSection(owlEditorKit, this));
    }
 
开发者ID:simonjupp,项目名称:skoseditor,代码行数:19,代码来源:SKOSDataPropertyAssertionsFrame.java

示例5: isFunctional

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
protected boolean isFunctional(OWLDataProperty property) {
	checkPreConditions(property);
	if (!m_isConsistent)
		return true;
	AtomicRole atomicRole = H(property);
	Individual freshIndividual = Individual
			.createAnonymous("fresh-individual");
	Constant freshConstantA = Constant.createAnonymous("fresh-constant-A");
	Constant freshConstantB = Constant.createAnonymous("fresh-constant-B");
	Set<Atom> assertions = new HashSet<Atom>();
	assertions.add(atomicRole.getRoleAssertion(freshIndividual,
			freshConstantA));
	assertions.add(atomicRole.getRoleAssertion(freshIndividual,
			freshConstantB));
	assertions.add(Atom.create(Inequality.INSTANCE, freshConstantA,
			freshConstantB));
	return !getTableau().isSatisfiable(
			false,
			assertions,
			null,
			null,
			null,
			null,
			new ReasoningTaskDescription(true, "functionality of {0}",
					atomicRole));
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:27,代码来源:Reasoner.java

示例6: visit

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
public void visit(SWRLDataRangeAtom atom) {
    if (atom.getArgument() instanceof SWRLVariable)
        throwVarError(atom);
    // dr(literal) :-
    // convert to: ClassAssertion(DataSomeValuesFrom(freshDP DataOneOf(literal)) freshIndividual)
    // and top -> \forall freshDP.dr
    OWLLiteral lit=((SWRLLiteralArgument)atom.getArgument()).getLiteral();
    OWLDataRange dr=atom.getPredicate();
    OWLNamedIndividual freshIndividual=getFreshIndividual();
    OWLDataProperty freshDP=getFreshDataProperty();
    OWLDataSomeValuesFrom some=m_factory.getOWLDataSomeValuesFrom(freshDP,m_factory.getOWLDataOneOf(lit));
    OWLClassExpression definition=getDefinitionFor(some,m_alreadyExists);
    if (!m_alreadyExists[0])
        m_newInclusions.add(new OWLClassExpression[] { negative(definition),some });
    addFact(m_factory.getOWLClassAssertionAxiom(definition,freshIndividual));
    m_newInclusions.add(new OWLClassExpression[] { m_factory.getOWLDataAllValuesFrom(freshDP,dr) });
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:18,代码来源:OWLNormalization.java

示例7: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLClass domain = featurePool.getExclusiveClass(":DatatypeMapsDomain");
  OWLDatatype range = factory.getOWLDatatype(datatype);

  String namespace = datatype.getPrefixedName().split(":")[0];
  String name = datatype.getShortForm();
  String propertyIri = ":" + namespace + WordUtils.capitalize(name) + "Property";
  OWLDataProperty property = factory.getOWLDataProperty(propertyIri, pm);

  addProperty(domain, property, range);
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:13,代码来源:AbstractDatatypeMapFeature.java

示例8: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLNamedIndividual source = factory.getOWLNamedIndividual(":NegativeDataPropertyAssertion_SourceIndividual", pm);
  OWLLiteral target = factory.getOWLLiteral("NegativeDataPropertyAssertion_TargetValue");
  OWLDataProperty property = factory.getOWLDataProperty(":negativeDataPropertyAssertionProperty", pm);

  addAxiomToOntology(factory.getOWLNegativeDataPropertyAssertionAxiom(property, source, target));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:9,代码来源:OwlNegativeDataPropertyAssertionFeature.java

示例9: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataExactQualifiedCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_STRING.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);
  OWLDataExactCardinality cardinality = factory.getOWLDataExactCardinality(12, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataExactQualifiedCardinalityRange"), cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataQualifiedCardinalityFeature.java

示例10: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMaxQualifiedCardinality_RL", pm);
  OWLDatatype datatype = OWL2Datatype.RDFS_LITERAL.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_BYTE.getDatatype(factory);
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(1, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMaxQualifiedCardinalityRange_RL"), cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMaxQualifiedCardinalityOwl2RlFeature.java

示例11: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMinCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_BOOLEAN.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLClass range = featurePool.getExclusiveClass(":DataMinCardinalityRange");
  OWLDataMinCardinality cardinality = factory.getOWLDataMinCardinality(3, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMinCardinalityFeature.java

示例12: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMinQualifiedCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_FLOAT.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_DATE_TIME.getDatatype(factory);
  OWLDataMinCardinality cardinality = factory.getOWLDataMinCardinality(9, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMinQualifiedCardinalityRange"), cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMinQualifiedCardinalityFeature.java

示例13: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMaxCardinality_RL", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_FLOAT.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLClass range = featurePool.getExclusiveClass(":DataMaxCardinalityRange_RL");
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(1, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMaxCardinalityOwl2RlFeature.java

示例14: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMaxQualifiedCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.RDFS_LITERAL.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLDatatype affectedDatatype = OWL2Datatype.XSD_BYTE.getDatatype(factory);
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(18, property, affectedDatatype);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(featurePool.getExclusiveClass(":DataMaxQualifiedCardinalityRange"), cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMaxQualifiedCardinalityFeature.java

示例15: addToOntology

import org.semanticweb.owlapi.model.OWLDataProperty; //导入依赖的package包/类
@Override
public void addToOntology() {
  OWLDataProperty property = factory.getOWLDataProperty(":dataMaxCardinality", pm);
  OWLDatatype datatype = OWL2Datatype.XSD_FLOAT.getDatatype(factory);
  addToGenericDomainAndNewRange(property, datatype);

  OWLClass range = featurePool.getExclusiveClass(":DataMaxCardinalityRange");
  OWLDataMaxCardinality cardinality = factory.getOWLDataMaxCardinality(19, property);

  addAxiomToOntology(factory.getOWLSubClassOfAxiom(range, cardinality));
}
 
开发者ID:VisualDataWeb,项目名称:OntoBench,代码行数:12,代码来源:OwlDataMaxCardinalityFeature.java


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