diff --git a/owlapy/model/__init__.py b/owlapy/model/__init__.py index 1759831..df06785 100644 --- a/owlapy/model/__init__.py +++ b/owlapy/model/__init__.py @@ -11,7 +11,7 @@ from owlapy.meta_classes import HasIRI, HasOperands, HasFiller, HasCardinality from owlapy.owl_class_expression import OWLNaryBooleanClassExpression, OWLClassExpression, OWLObjectComplementOf, \ OWLAnonymousClassExpression, OWLBooleanClassExpression, OWLPropertyRange, OWLDataRange, OWLClass, OWLObjectUnionOf, \ - OWLObjectIntersectionOf + OWLObjectIntersectionOf, OWLThing, OWLNothing from owlapy.owl_property import OWLObjectPropertyExpression, OWLProperty, OWLPropertyExpression, \ OWLDataPropertyExpression, OWLDataProperty, OWLObjectProperty from owlapy.owl_restriction import (OWLRestriction, OWLObjectAllValuesFrom, OWLObjectSomeValuesFrom, @@ -26,8 +26,6 @@ OWLDataPropertyDomainAxiom, OWLAxiom, OWLDataPropertyRangeAxiom, OWLObjectPropertyDomainAxiom, OWLObjectPropertyRangeAxiom) from owlapy.types import OWLDatatype -# Data and object should be merged -# from owlapy.owl_data import OWLDataComplementOf, OWLDataIntersectionOf,OWLDataUnionOf, OWLNaryDataRange from owlapy.owl_literal import OWLLiteral @@ -41,89 +39,6 @@ _M = TypeVar('_M', bound='OWLOntologyManager') #: -class OWLObjectHasValue(OWLHasValueRestriction[OWLIndividual], OWLObjectRestriction): - """Represents an ObjectHasValue class expression in the OWL 2 Specification.""" - __slots__ = '_property', '_v' - type_index: Final = 3007 - - _property: OWLObjectPropertyExpression - _v: OWLIndividual - - def __init__(self, property: OWLObjectPropertyExpression, individual: OWLIndividual): - """ - Args: - property: The property that the restriction acts along. - individual: Individual for restriction. - - Returns: - A HasValue restriction with specified property and value - """ - super().__init__(individual) - self._property = property - - def get_property(self) -> OWLObjectPropertyExpression: - # documented in parent - return self._property - - def as_some_values_from(self) -> OWLClassExpression: - """A convenience method that obtains this restriction as an existential restriction with a nominal filler. - - Returns: - The existential equivalent of this value restriction. simp(HasValue(p a)) = some(p {a}). - """ - return OWLObjectSomeValuesFrom(self.get_property(), OWLObjectOneOf(self.get_filler())) - - def __repr__(self): - return f'OWLObjectHasValue(property={self.get_property()}, individual={self._v})' - - -class OWLObjectOneOf(OWLAnonymousClassExpression, HasOperands[OWLIndividual]): - """Represents an ObjectOneOf class expression in the OWL 2 Specification.""" - __slots__ = '_values' - type_index: Final = 3004 - - def __init__(self, values: Union[OWLIndividual, Iterable[OWLIndividual]]): - if isinstance(values, OWLIndividual): - self._values = values, - else: - for _ in values: - assert isinstance(_, OWLIndividual) - self._values = tuple(values) - - def individuals(self) -> Iterable[OWLIndividual]: - """Gets the individuals that are in the oneOf. These individuals represent the exact instances (extension) - of this class expression. - - Returns: - The individuals that are the values of this {@code ObjectOneOf} class expression. - """ - yield from self._values - - def operands(self) -> Iterable[OWLIndividual]: - # documented in parent - yield from self.individuals() - - def as_object_union_of(self) -> OWLClassExpression: - """Simplifies this enumeration to a union of singleton nominals. - - Returns: - This enumeration in a more standard DL form. - simp({a}) = {a} simp({a0, ... , {an}) = unionOf({a0}, ... , {an}) - """ - if len(self._values) == 1: - return self - return OWLObjectUnionOf(map(lambda _: OWLObjectOneOf(_), self.individuals())) - - def __hash__(self): - return hash(self._values) - - def __eq__(self, other): - if type(other) == type(self): - return self._values == other._values - return NotImplemented - - def __repr__(self): - return f'OWLObjectOneOf({self._values})' class OWLOntologyID: @@ -189,75 +104,6 @@ def __eq__(self, other): return NotImplemented -class OWLDatatypeRestriction(OWLDataRange): - """Represents a DatatypeRestriction data range in the OWL 2 Specification.""" - __slots__ = '_type', '_facet_restrictions' - - type_index: Final = 4006 - - _type: OWLDatatype - _facet_restrictions: Sequence['OWLFacetRestriction'] - - def __init__(self, type_: OWLDatatype, facet_restrictions: Union['OWLFacetRestriction', - Iterable['OWLFacetRestriction']]): - self._type = type_ - if isinstance(facet_restrictions, OWLFacetRestriction): - facet_restrictions = facet_restrictions, - self._facet_restrictions = tuple(facet_restrictions) - - def get_datatype(self) -> OWLDatatype: - return self._type - - def get_facet_restrictions(self) -> Sequence['OWLFacetRestriction']: - return self._facet_restrictions - - def __eq__(self, other): - if type(other) is type(self): - return self._type == other._type \ - and self._facet_restrictions == other._facet_restrictions - return NotImplemented - - def __hash__(self): - return hash((self._type, self._facet_restrictions)) - - def __repr__(self): - return f'OWLDatatypeRestriction({repr(self._type)}, {repr(self._facet_restrictions)})' - - -class OWLFacetRestriction(OWLObject): - """A facet restriction is used to restrict a particular datatype.""" - - __slots__ = '_facet', '_literal' - - type_index: Final = 4007 - - _facet: OWLFacet - _literal: 'OWLLiteral' - - def __init__(self, facet: OWLFacet, literal: Literals): - self._facet = facet - if isinstance(literal, OWLLiteral): - self._literal = literal - else: - self._literal = OWLLiteral(literal) - - def get_facet(self) -> OWLFacet: - return self._facet - - def get_facet_value(self) -> 'OWLLiteral': - return self._literal - - def __eq__(self, other): - if type(other) is type(self): - return self._facet == other._facet and self._literal == other._literal - return NotImplemented - - def __hash__(self): - return hash((self._facet, self._literal)) - - def __repr__(self): - return f'OWLFacetRestriction({self._facet}, {repr(self._literal)})' - class OWLImportsDeclaration(HasIRI): """Represents an import statement in an ontology.""" @@ -926,8 +772,7 @@ class expression with respect to the imports closure of the root ontology. """Important constant objects section""" # @TODO: Some of them must be removed from here as they are defined under owl literal -OWLThing: Final = OWLClass(OWLRDFVocabulary.OWL_THING.get_iri()) #: : :The OWL Class corresponding to owl:Thing -OWLNothing: Final = OWLClass(OWLRDFVocabulary.OWL_NOTHING.get_iri()) #: : :The OWL Class corresponding to owl:Nothing + #: the built in top object property OWLTopObjectProperty: Final = OWLObjectProperty(OWLRDFVocabulary.OWL_TOP_OBJECT_PROPERTY.get_iri()) #: the built in bottom object property diff --git a/owlapy/model/providers.py b/owlapy/model/providers.py index e51251b..df457e5 100644 --- a/owlapy/model/providers.py +++ b/owlapy/model/providers.py @@ -1,7 +1,8 @@ """OWL Datatype restriction constructors.""" from typing import Union from datetime import datetime, date -from owlapy.model import OWLDatatypeRestriction, OWLFacet, OWLFacetRestriction, OWLLiteral +from owlapy.owl_literal import OWLLiteral +from owlapy.owl_restriction import OWLDatatypeRestriction, OWLFacet, OWLFacetRestriction from pandas import Timedelta Restriction_Literals = Union[OWLLiteral, int, float, Timedelta, datetime, date] diff --git a/owlapy/owl_restriction.py b/owlapy/owl_restriction.py index ea2ef27..2a664cf 100644 --- a/owlapy/owl_restriction.py +++ b/owlapy/owl_restriction.py @@ -5,9 +5,18 @@ from .owl_property import OWLPropertyExpression, OWLObjectPropertyExpression, OWLDataPropertyExpression from .ranges import OWLPropertyRange, OWLDataRange from .owl_literal import OWLLiteral +from .owl_individual import OWLIndividual +from .types import OWLDatatype +from .owlobject import OWLObject +from owlapy.vocab import OWLRDFVocabulary, XSDVocabulary, OWLFacet +from datetime import datetime, date +from pandas import Timedelta _T = TypeVar('_T') #: _F = TypeVar('_F', bound=OWLPropertyRange) #: + +Literals = Union['OWLLiteral', int, float, bool, Timedelta, datetime, date, str] #: + class OWLRestriction(OWLAnonymousClassExpression): """Represents an Object Property Restriction or Data Property Restriction in the OWL 2 specification.""" __slots__ = () @@ -530,6 +539,56 @@ def get_property(self) -> OWLDataPropertyExpression: return self._property + +class OWLObjectOneOf(OWLAnonymousClassExpression, HasOperands[OWLIndividual]): + """Represents an ObjectOneOf class expression in the OWL 2 Specification.""" + __slots__ = '_values' + type_index: Final = 3004 + + def __init__(self, values: Union[OWLIndividual, Iterable[OWLIndividual]]): + if isinstance(values, OWLIndividual): + self._values = values, + else: + for _ in values: + assert isinstance(_, OWLIndividual) + self._values = tuple(values) + + def individuals(self) -> Iterable[OWLIndividual]: + """Gets the individuals that are in the oneOf. These individuals represent the exact instances (extension) + of this class expression. + + Returns: + The individuals that are the values of this {@code ObjectOneOf} class expression. + """ + yield from self._values + + def operands(self) -> Iterable[OWLIndividual]: + # documented in parent + yield from self.individuals() + + def as_object_union_of(self) -> OWLClassExpression: + """Simplifies this enumeration to a union of singleton nominals. + + Returns: + This enumeration in a more standard DL form. + simp({a}) = {a} simp({a0, ... , {an}) = unionOf({a0}, ... , {an}) + """ + if len(self._values) == 1: + return self + return OWLObjectUnionOf(map(lambda _: OWLObjectOneOf(_), self.individuals())) + + def __hash__(self): + return hash(self._values) + + def __eq__(self, other): + if type(other) == type(self): + return self._values == other._values + return NotImplemented + + def __repr__(self): + return f'OWLObjectOneOf({self._values})' + + class OWLDataOneOf(OWLDataRange, HasOperands[OWLLiteral]): """Represents DataOneOf in the OWL 2 Specification.""" type_index: Final = 4003 @@ -566,3 +625,106 @@ def __eq__(self, other): def __repr__(self): return f'OWLDataOneOf({self._values})' + + +class OWLObjectHasValue(OWLHasValueRestriction[OWLIndividual], OWLObjectRestriction): + """Represents an ObjectHasValue class expression in the OWL 2 Specification.""" + __slots__ = '_property', '_v' + type_index: Final = 3007 + + _property: OWLObjectPropertyExpression + _v: OWLIndividual + + def __init__(self, property: OWLObjectPropertyExpression, individual: OWLIndividual): + """ + Args: + property: The property that the restriction acts along. + individual: Individual for restriction. + + Returns: + A HasValue restriction with specified property and value + """ + super().__init__(individual) + self._property = property + + def get_property(self) -> OWLObjectPropertyExpression: + # documented in parent + return self._property + + def as_some_values_from(self) -> OWLClassExpression: + """A convenience method that obtains this restriction as an existential restriction with a nominal filler. + + Returns: + The existential equivalent of this value restriction. simp(HasValue(p a)) = some(p {a}). + """ + return OWLObjectSomeValuesFrom(self.get_property(), OWLObjectOneOf(self.get_filler())) + + def __repr__(self): + return f'OWLObjectHasValue(property={self.get_property()}, individual={self._v})' +class OWLDatatypeRestriction(OWLDataRange): + """Represents a DatatypeRestriction data range in the OWL 2 Specification.""" + __slots__ = '_type', '_facet_restrictions' + + type_index: Final = 4006 + + _type: OWLDatatype + _facet_restrictions: Sequence['OWLFacetRestriction'] + + def __init__(self, type_: OWLDatatype, facet_restrictions: Union['OWLFacetRestriction', + Iterable['OWLFacetRestriction']]): + self._type = type_ + if isinstance(facet_restrictions, OWLFacetRestriction): + facet_restrictions = facet_restrictions, + self._facet_restrictions = tuple(facet_restrictions) + + def get_datatype(self) -> OWLDatatype: + return self._type + + def get_facet_restrictions(self) -> Sequence['OWLFacetRestriction']: + return self._facet_restrictions + + def __eq__(self, other): + if type(other) is type(self): + return self._type == other._type \ + and self._facet_restrictions == other._facet_restrictions + return NotImplemented + + def __hash__(self): + return hash((self._type, self._facet_restrictions)) + + def __repr__(self): + return f'OWLDatatypeRestriction({repr(self._type)}, {repr(self._facet_restrictions)})' +class OWLFacetRestriction(OWLObject): + """A facet restriction is used to restrict a particular datatype.""" + + __slots__ = '_facet', '_literal' + + type_index: Final = 4007 + + _facet: OWLFacet + _literal: 'OWLLiteral' + + def __init__(self, facet: OWLFacet, literal: Literals): + self._facet = facet + if isinstance(literal, OWLLiteral): + self._literal = literal + else: + self._literal = OWLLiteral(literal) + + def get_facet(self) -> OWLFacet: + return self._facet + + def get_facet_value(self) -> 'OWLLiteral': + return self._literal + + def __eq__(self, other): + if type(other) is type(self): + return self._facet == other._facet and self._literal == other._literal + return NotImplemented + + def __hash__(self): + return hash((self._facet, self._literal)) + + def __repr__(self): + return f'OWLFacetRestriction({self._facet}, {repr(self._literal)})' + diff --git a/owlapy/parser.py b/owlapy/parser.py index ec8291f..7d771da 100644 --- a/owlapy/parser.py +++ b/owlapy/parser.py @@ -10,18 +10,17 @@ from .vocab import OWLFacet, OWLRDFVocabulary -from owlapy.model import OWLObjectHasSelf, OWLObjectIntersectionOf, OWLObjectMinCardinality, OWLObjectOneOf, \ - OWLObjectProperty, OWLObjectPropertyExpression, OWLObjectSomeValuesFrom, OWLObjectUnionOf, OWLClass, IRI, \ +from owlapy.model import OWLObjectHasSelf, OWLObjectIntersectionOf, OWLObjectMinCardinality, OWLObjectProperty, OWLObjectPropertyExpression, OWLObjectSomeValuesFrom, OWLObjectUnionOf, OWLClass, IRI, \ OWLClassExpression, OWLDataProperty, OWLNamedIndividual, OWLObjectComplementOf, OWLObjectExactCardinality, \ - OWLObjectHasValue, OWLQuantifiedDataRestriction, OWLQuantifiedObjectRestriction, StringOWLDatatype, \ + OWLQuantifiedDataRestriction, OWLQuantifiedObjectRestriction, StringOWLDatatype, \ DateOWLDatatype, DateTimeOWLDatatype, DoubleOWLDatatype, DurationOWLDatatype, IntegerOWLDatatype, \ - OWLDataSomeValuesFrom, OWLDatatypeRestriction, OWLFacetRestriction, OWLDataExactCardinality, \ + OWLDataSomeValuesFrom, OWLDataExactCardinality, \ OWLDataMaxCardinality, OWLObjectMaxCardinality, OWLDataMinCardinality, OWLDataHasValue, \ OWLLiteral, OWLDataRange, OWLDataOneOf, OWLDatatype, OWLObjectCardinalityRestriction, \ OWLDataCardinalityRestriction, OWLObjectAllValuesFrom, OWLDataAllValuesFrom, BooleanOWLDatatype from owlapy.owl_class_expression import OWLDataIntersectionOf, OWLDataUnionOf, OWLDataComplementOf - +from owlapy.owl_restriction import OWLObjectHasValue, OWLDatatypeRestriction, OWLFacetRestriction, OWLObjectOneOf MANCHESTER_GRAMMAR = Grammar(r""" diff --git a/owlapy/render.py b/owlapy/render.py index 118f063..7af5aa1 100644 --- a/owlapy/render.py +++ b/owlapy/render.py @@ -11,16 +11,17 @@ from .owl_class_expression import OWLClassExpression # from owlapy.io import OWLObjectRenderer -from owlapy.model import OWLLiteral, OWLObject, OWLClass, OWLObjectSomeValuesFrom, \ +from owlapy.model import (OWLLiteral, OWLObject, OWLClass, OWLObjectSomeValuesFrom, \ OWLObjectAllValuesFrom, OWLObjectUnionOf, OWLBooleanClassExpression, OWLNaryBooleanClassExpression, \ OWLObjectIntersectionOf, OWLObjectComplementOf, OWLRestriction, \ - OWLObjectMinCardinality, OWLObjectExactCardinality, OWLObjectMaxCardinality, OWLObjectHasSelf, OWLObjectHasValue, \ - OWLObjectOneOf, OWLNamedIndividual, OWLEntity, IRI, OWLPropertyExpression, OWLDataSomeValuesFrom, \ - OWLFacetRestriction, OWLDatatypeRestriction, OWLDatatype, OWLDataAllValuesFrom, \ + OWLObjectMinCardinality, OWLObjectExactCardinality, OWLObjectMaxCardinality, OWLObjectHasSelf, + OWLNamedIndividual, OWLEntity, IRI, OWLPropertyExpression, OWLDataSomeValuesFrom, \ + OWLDatatype, OWLDataAllValuesFrom, \ OWLDataHasValue, OWLDataOneOf, OWLDataMaxCardinality, \ - OWLDataMinCardinality, OWLDataExactCardinality + OWLDataMinCardinality, OWLDataExactCardinality) from owlapy.vocab import OWLFacet from .owl_class_expression import OWLNaryDataRange, OWLDataComplementOf, OWLDataUnionOf, OWLDataIntersectionOf +from .owl_restriction import OWLObjectHasValue, OWLFacetRestriction, OWLDatatypeRestriction, OWLObjectOneOf _DL_SYNTAX = types.SimpleNamespace( SUBCLASS="⊑", diff --git a/owlapy/util.py b/owlapy/util.py index df9c8ff..0fad5f4 100644 --- a/owlapy/util.py +++ b/owlapy/util.py @@ -5,13 +5,14 @@ from .owl_property import OWLObjectInverseOf from owlapy.model import HasIRI, OWLClassExpression, OWLClass, OWLObjectCardinalityRestriction, \ OWLObjectComplementOf, OWLNothing, OWLPropertyRange, OWLRestriction, OWLThing, OWLObjectSomeValuesFrom, \ - OWLObjectHasValue, OWLObjectMinCardinality, OWLObjectMaxCardinality, OWLObjectExactCardinality, OWLObjectHasSelf, \ - OWLObjectOneOf, OWLDataMaxCardinality, OWLDataMinCardinality, OWLDataExactCardinality, OWLDataHasValue, \ + OWLObjectMinCardinality, OWLObjectMaxCardinality, OWLObjectExactCardinality, OWLObjectHasSelf, \ + OWLDataMaxCardinality, OWLDataMinCardinality, OWLDataExactCardinality, OWLDataHasValue, \ OWLDataAllValuesFrom, OWLDataSomeValuesFrom, OWLObjectAllValuesFrom, HasFiller, HasCardinality, HasOperands, \ - OWLDatatypeRestriction, OWLDatatype,OWLDataOneOf, OWLFacetRestriction, OWLLiteral, OWLObjectIntersectionOf, \ + OWLDatatype,OWLDataOneOf, OWLLiteral, OWLObjectIntersectionOf, \ OWLDataCardinalityRestriction, OWLNaryBooleanClassExpression, OWLObjectUnionOf, \ OWLDataRange, OWLObject from .owl_class_expression import OWLDataComplementOf, OWLDataUnionOf, OWLDataIntersectionOf, OWLNaryDataRange +from .owl_restriction import OWLObjectHasValue, OWLDatatypeRestriction, OWLFacetRestriction, OWLObjectOneOf _HasIRI = TypeVar('_HasIRI', bound=HasIRI) #: _HasIndex = TypeVar('_HasIndex', bound=HasIndex) #: diff --git a/tests/test_owlapy_cnf_dnf.py b/tests/test_owlapy_cnf_dnf.py index ffbfd52..dadc339 100644 --- a/tests/test_owlapy_cnf_dnf.py +++ b/tests/test_owlapy_cnf_dnf.py @@ -2,10 +2,10 @@ from owlapy.model import OWLObjectProperty, OWLObjectSomeValuesFrom, OWLObjectUnionOf, \ OWLClass, IRI, OWLDataProperty, OWLDataSomeValuesFrom, OWLNamedIndividual, OWLObjectComplementOf, \ - OWLObjectIntersectionOf, OWLObjectMinCardinality, OWLObjectOneOf + OWLObjectIntersectionOf, OWLObjectMinCardinality from owlapy.model.providers import OWLDatatypeMinExclusiveRestriction from owlapy.util import TopLevelCNF, TopLevelDNF - +from owlapy.owl_restriction import OWLObjectOneOf class TopLevelNFTest(unittest.TestCase): diff --git a/tests/test_owlapy_nnf.py b/tests/test_owlapy_nnf.py index 3789629..9453541 100644 --- a/tests/test_owlapy_nnf.py +++ b/tests/test_owlapy_nnf.py @@ -26,13 +26,15 @@ from owlapy.model import OWLObjectProperty, OWLNamedIndividual, OWLObjectComplementOf, \ OWLObjectAllValuesFrom, OWLObjectSomeValuesFrom, OWLObjectIntersectionOf, OWLObjectUnionOf, \ - OWLObjectMinCardinality, OWLObjectMaxCardinality, OWLObjectHasValue, OWLObjectOneOf, OWLClassExpression, IRI, \ + OWLObjectMinCardinality, OWLObjectMaxCardinality, OWLClassExpression, IRI, \ BooleanOWLDatatype, DoubleOWLDatatype, IntegerOWLDatatype, OWLClass, OWLDataAllValuesFrom, \ OWLDataProperty, OWLDataSomeValuesFrom,OWLDataHasValue, OWLDataMaxCardinality, OWLDataMinCardinality, OWLDataOneOf, OWLLiteral from owlapy.model.providers import OWLDatatypeMinMaxExclusiveRestriction from owlapy.util import NNF from owlapy.owl_class_expression import OWLDataComplementOf, OWLDataIntersectionOf, OWLDataUnionOf +from owlapy.owl_restriction import OWLObjectHasValue, OWLObjectOneOf + def iri(suffix): NS = "http://example.org/" return IRI.create(NS, suffix) diff --git a/tests/test_owlapy_parser.py b/tests/test_owlapy_parser.py index 2ffef71..6abcdce 100644 --- a/tests/test_owlapy_parser.py +++ b/tests/test_owlapy_parser.py @@ -4,17 +4,17 @@ from pandas import Timedelta from owlapy.owl_property import OWLObjectInverseOf -from owlapy.model import OWLObjectMinCardinality, OWLObjectSomeValuesFrom, \ - OWLObjectUnionOf, DoubleOWLDatatype, IntegerOWLDatatype, OWLClass, IRI, OWLDataAllValuesFrom, \ - OWLDataOneOf, OWLDataProperty, OWLDataSomeValuesFrom, OWLDatatypeRestriction, \ +from owlapy.model import OWLObjectUnionOf, DoubleOWLDatatype, IntegerOWLDatatype, OWLClass, IRI, OWLDataAllValuesFrom, \ + OWLDataOneOf, OWLDataProperty, \ OWLLiteral, OWLNamedIndividual, OWLObjectAllValuesFrom, OWLObjectComplementOf, OWLObjectExactCardinality, \ - OWLObjectHasSelf, OWLObjectHasValue, OWLObjectIntersectionOf, OWLObjectMaxCardinality, OWLObjectOneOf, \ - OWLObjectProperty, OWLDataExactCardinality, OWLDataMaxCardinality, \ - OWLDataMinCardinality, OWLDataHasValue, OWLThing, OWLNothing, OWLFacetRestriction + OWLObjectHasSelf, OWLObjectIntersectionOf, OWLObjectMaxCardinality, OWLObjectProperty, OWLDataExactCardinality, OWLDataMaxCardinality, \ + OWLDataMinCardinality, OWLDataHasValue, OWLThing, OWLNothing from owlapy.owl_class_expression import OWLDataIntersectionOf, OWLDataComplementOf, OWLDataUnionOf from owlapy.model.providers import OWLDatatypeMinExclusiveRestriction,\ OWLDatatypeMinMaxExclusiveRestriction, OWLDatatypeMaxExclusiveRestriction +from owlapy.owl_restriction import OWLDataSomeValuesFrom, OWLDatatypeRestriction, OWLFacetRestriction, OWLObjectSomeValuesFrom, OWLObjectMinCardinality, OWLObjectHasValue,OWLObjectOneOf + from owlapy.parser import DLSyntaxParser, ManchesterOWLSyntaxParser from owlapy.vocab import OWLFacet diff --git a/tests/test_owlapy_render.py b/tests/test_owlapy_render.py index ead20b3..af06e63 100644 --- a/tests/test_owlapy_render.py +++ b/tests/test_owlapy_render.py @@ -1,15 +1,14 @@ import unittest from owlapy.owl_property import OWLObjectProperty from owlapy.model import OWLDataMinCardinality, OWLObjectIntersectionOf, OWLObjectSomeValuesFrom, \ - OWLThing, OWLObjectComplementOf, OWLObjectUnionOf, OWLNamedIndividual, OWLObjectOneOf, OWLObjectHasValue, \ - OWLObjectMinCardinality, IRI, OWLDataProperty, DoubleOWLDatatype, OWLClass, \ + OWLThing, OWLObjectComplementOf, OWLObjectUnionOf, OWLNamedIndividual, OWLObjectMinCardinality, IRI, OWLDataProperty, DoubleOWLDatatype, OWLClass, \ IntegerOWLDatatype, OWLDataExactCardinality, OWLDataHasValue, OWLDataAllValuesFrom, \ OWLDataOneOf, OWLDataSomeValuesFrom, OWLLiteral, BooleanOWLDatatype, \ OWLDataMaxCardinality from owlapy.owl_class_expression import OWLDataComplementOf, OWLDataIntersectionOf, OWLDataUnionOf from owlapy.model.providers import OWLDatatypeMinMaxInclusiveRestriction from owlapy.render import DLSyntaxObjectRenderer, ManchesterOWLSyntaxOWLObjectRenderer - +from owlapy.owl_restriction import OWLObjectHasValue, OWLObjectOneOf class Owlapy_DLRenderer_Test(unittest.TestCase): def test_ce_render(self):