本文整理汇总了Java中org.semanticweb.owlapi.model.OWLDataRange类的典型用法代码示例。如果您正苦于以下问题:Java OWLDataRange类的具体用法?Java OWLDataRange怎么用?Java OWLDataRange使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OWLDataRange类属于org.semanticweb.owlapi.model包,在下文中一共展示了OWLDataRange类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: OWLAxioms
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的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>();
}
示例2: visit
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
public void visit(SWRLDataRangeAtom at) {
OWLDataRange dr=at.getPredicate();
SWRLDArgument argument=at.getArgument();
if (!(argument instanceof SWRLVariable))
throw new IllegalArgumentException("A SWRL rule contains a data range with an argument that is not a literal, and such rules are not supported.");
if (!m_isPositive)
dr=m_factory.getOWLDataComplementOf(dr);
dr=m_expressionManager.getNNF(m_expressionManager.getSimplified(dr));
if (dr instanceof OWLDataIntersectionOf || dr instanceof OWLDataUnionOf) {
OWLDatatype definition=getDefinitionFor(dr,m_alreadyExists);
if (!m_alreadyExists[0])
m_dataRangeInclusions.add(new OWLDataRange[] { negative(definition),dr });
dr=definition;
}
SWRLAtom atom=m_factory.getSWRLDataRangeAtom(dr,argument);
m_normalizedHeadAtoms.add(atom);
m_headDataRangeVariables.add((SWRLVariable)argument);
}
示例3: visit
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
public void visit(OWLDataComplementOf dr) {
OWLDataRange description=dr.getDataRange();
if (description.isDatatype() && (Prefixes.isInternalIRI(description.asOWLDatatype().getIRI().toString()) || m_definedDatatypeIRIs.contains(description.asOWLDatatype()))) {
m_bodyAtoms.add(Atom.create(InternalDatatype.create(description.asOWLDatatype().getIRI().toString()),X));
}
else {
LiteralDataRange literalRange=m_dataRangeConverter.convertDataRange(dr);
if (literalRange.isNegatedInternalDatatype()) {
InternalDatatype negatedDatatype=(InternalDatatype)literalRange.getNegation();
if (!negatedDatatype.isAlwaysTrue())
m_bodyAtoms.add(Atom.create(negatedDatatype,X));
}
else {
if (!literalRange.isAlwaysFalse())
m_headAtoms.add(Atom.create((DLPredicate)literalRange,X));
}
}
}
示例4: OWLAxioms
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的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_aspConstraints=new HashSet<ASPConstraint>();
m_aspRules=new HashSet<ASPRule>();
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>();
}
示例5: OWLNormalization
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
public OWLNormalization(OWLDataFactory factory,OWLAxioms axioms,int firstReplacementIndex) {
m_factory=factory;
m_axioms=axioms;
m_firstReplacementIndex=firstReplacementIndex;
m_definitions=new HashMap<OWLClassExpression,OWLClassExpression>();
m_definitionsForNegativeNominals=new HashMap<OWLObjectOneOf,OWLClass>();
m_expressionManager=new ExpressionManager(m_factory);
m_plVisitor=new PLVisitor();
m_dataRangeDefinitions=new HashMap<OWLDataRange,OWLDatatype>();
}
示例6: visit
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
public OWLClassExpression visit(OWLDataMinCardinality d) {
OWLDataRange filler=getSimplified(d.getFiller());
if (d.getCardinality()<=0)
return m_factory.getOWLThing();
else if (isBottomDataRange(filler))
return m_factory.getOWLNothing();
else if (d.getCardinality()==1)
return m_factory.getOWLDataSomeValuesFrom(d.getProperty(),filler);
else
return m_factory.getOWLDataMinCardinality(d.getCardinality(),d.getProperty(),filler);
}
示例7: getDefinitionFor
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
protected OWLDatatype getDefinitionFor(OWLDataRange dr,boolean[] alreadyExists) {
OWLDatatype definition=m_dataRangeDefinitions.get(dr);
if (definition==null) {
definition=m_factory.getOWLDatatype(IRI.create("internal:defdata#"+m_dataRangeDefinitions.size()));
m_dataRangeDefinitions.put(dr,definition);
alreadyExists[0]=false;
}
else {
alreadyExists[0]=true;
}
return definition;
}
示例8: visit
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
public OWLDataRange visit(OWLDataComplementOf o) {
OWLDataRange dataRangeSimplified=getSimplified(o.getDataRange());
if (dataRangeSimplified instanceof OWLDataComplementOf)
return ((OWLDataComplementOf)dataRangeSimplified).getDataRange();
else
return m_factory.getOWLDataComplementOf(dataRangeSimplified);
}
示例9: visit
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
public OWLClassExpression visit(OWLDataMaxCardinality d) {
OWLDataRange filler=getSimplified(d.getFiller());
if (isBottomDataRange(filler))
return m_factory.getOWLThing();
else if (d.getCardinality()<=0)
return m_factory.getOWLDataAllValuesFrom(d.getProperty(),m_factory.getOWLDataComplementOf(filler));
else
return m_factory.getOWLDataMaxCardinality(d.getCardinality(),d.getProperty(),filler);
}
示例10: toDataRangeSet
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
Set<OWLDataRange> toDataRangeSet(List<? extends ElkDataRange> input) {
Set<OWLDataRange> result = new HashSet<OWLDataRange>(input.size());
for (ElkDataRange next : input) {
result.add(convert(next));
}
return result;
}
示例11: convert
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
@Override
public OWLDataRange convert(ElkDataRange input) {
if (input instanceof ElkDataRangeWrap<?>) {
return ((ElkDataRangeWrap<?>) input).getOwlObject();
}
// else
return (OWLDataRange) input.accept(this);
}
示例12: OWLNormalization
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
public OWLNormalization(OWLDataFactory factory,OWLAxioms axioms,int firstReplacementIndex) {
m_factory=factory;
m_axioms=axioms;
m_firstReplacementIndex=firstReplacementIndex;
m_definitions=new HashMap<OWLClassExpression,OWLClassExpression>();
m_definitionsForNegativeNominals=new HashMap<OWLObjectOneOf,OWLClass>();
m_expressionManager=new ExpressionManager(m_factory);
m_plVisitor=new PLVisitor();
m_dataRangeDefinitions=new HashMap<OWLDataRange,OWLDatatype>();
m_domain = new HashSet<OWLNamedIndividual>();
}
示例13: addToGenericDomainAndNewRange
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
protected void addToGenericDomainAndNewRange(OWLDataProperty property, OWLDataRange range) {
OWLClass domain = featurePool.getReusableClass();
addProperty(domain, property, range);
}
示例14: addProperty
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
protected void addProperty(OWLClass domain, OWLDataProperty property, OWLDataRange range) {
addAxiomToOntology(factory.getOWLDataPropertyDomainAxiom(property, domain));
addAxiomToOntology(factory.getOWLDataPropertyRangeAxiom(property, range));
}
示例15: isLiteral
import org.semanticweb.owlapi.model.OWLDataRange; //导入依赖的package包/类
protected static boolean isLiteral(OWLDataRange dr) {
return isAtomic(dr) || isNegatedAtomic(dr);
}