Skip to content

Commit

Permalink
data ranges module created
Browse files Browse the repository at this point in the history
  • Loading branch information
Demirrr committed Apr 9, 2024
1 parent b07f21f commit 4cf4cbc
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion owlapy/class_expression/class_expression.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ..ranges import OWLPropertyRange, OWLDataRange
from abc import abstractmethod, ABCMeta
from ..data_ranges import OWLPropertyRange, OWLDataRange
from ..meta_classes import HasOperands

from typing import Final, Iterable
Expand Down
17 changes: 15 additions & 2 deletions owlapy/data_ranges/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
"""https://www.w3.org/TR/owl2-syntax/#Data_Ranges
DataRange := Datatype | DataIntersectionOf | DataUnionOf | DataComplementOf | DataOneOf | DatatypeRestriction
"""
from abc import abstractmethod, ABCMeta
from ..owlobject import OWLObject, OWLEntity
from ..meta_classes import HasOperands
from typing import Final, Iterable, Sequence
from ..ranges import OWLPropertyRange, OWLDataRange
from ..owl_literal import OWLLiteral
# from ..owl_literal import OWLLiteral
from typing import Final, Sequence, Union, Iterable
from ..iri import IRI

from abc import ABCMeta

class OWLPropertyRange(OWLObject, metaclass=ABCMeta):
"""OWL Objects that can be the ranges of properties."""


class OWLDataRange(OWLPropertyRange, metaclass=ABCMeta):
"""Represents a DataRange in the OWL 2 Specification."""


class OWLDataComplementOf(OWLDataRange):
"""Represents DataComplementOf in the OWL 2 Specification."""
type_index: Final = 4002
Expand Down
2 changes: 1 addition & 1 deletion owlapy/owl_restriction.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import TypeVar, Generic, Final, Sequence, Union, Iterable
from .class_expression import OWLAnonymousClassExpression, OWLClassExpression, OWLObjectIntersectionOf
from .owl_property import OWLPropertyExpression, OWLObjectPropertyExpression, OWLDataPropertyExpression
from .ranges import OWLPropertyRange, OWLDataRange
from .data_ranges import OWLPropertyRange, OWLDataRange
from .owl_literal import OWLLiteral
from .owl_individual import OWLIndividual
from .types import OWLDatatype
Expand Down
9 changes: 0 additions & 9 deletions owlapy/ranges.py

This file was deleted.

2 changes: 1 addition & 1 deletion owlapy/types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .owlobject import OWLObject, OWLEntity
from .ranges import OWLDataRange
from .data_ranges import OWLPropertyRange, OWLDataRange
from .iri import IRI
from .meta_classes import HasIRI
from typing import Final, Union
Expand Down

0 comments on commit 4cf4cbc

Please sign in to comment.