@base <http://purl.org/ceu/eco> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <lco#> .
@prefix eco: <#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix swrlb: <http://www.w3.org/2003/11/swrlb#> .
@prefix swrl: <http://www.w3.org/2003/11/swrl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix eco2: <eco/1.0#> .
@prefix dc: <../dc/elements/1.1/> .

<>
    dc:creator "Alfredo Sánchez Alberca (asalber@ceu.es) <http://aprendeconalf.es/foaf.rdf>"@es ;
    dc:rights "E-Collections ontology is released under Attribution-ShareAlike 4.0 International Creative Commons license: http://creativecommons.org/licenses/by-sa/4.0/"@en, "La ontología E-Collections está bajo una licencia de Creative Commons Reconocimiento-CompartirIgual 4.0 Internacional ( http://creativecommons.org/licenses/by-sa/4.0/)."@es ;
    a owl:Ontology ;
    rdfs:comment "La ontología E-Collections define una clasificación taxonómica de distintos tipos de colecciones de acuerdo a las características de homogeneidad, unicidad, orden y cardinalidad."@es, "The E-Collections ontology defines a collections taxonomy for different collection types based on the structural properties of homogeneity, uniqueness, order and cardinality."@en ;
    rdfs:label "E-Collections Ontology"@en, "Ontología E-Collections"@es ;
    owl:imports <http://www.essepuntato.it/2009/10/error> ;
    owl:versionIRI <eco/1.0> ;
    owl:versionInfo "Version 1.0 2015/02/01"@en, "Versión 1.0 01/02/2015"@de .

<#1CardinalityCollection>
    a owl:Class ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (eco:FixedCardinalityCollection
            [
                a owl:Restriction ;
                owl:onClass eco:Item ;
                owl:onProperty eco:hasItem ;
                owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
            ]
        )
    ] .

<#2CardinalityCollection>
    a owl:Class ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (eco:FixedCardinalityCollection
            [
                a owl:Restriction ;
                owl:onClass eco:Item ;
                owl:onProperty eco:hasItem ;
                owl:qualifiedCardinality "2"^^xsd:nonNegativeInteger
            ]
        )
    ] .

<#3CardinalityCollection>
    a owl:Class ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (eco:FixedCardinalityCollection
            [
                a owl:Restriction ;
                owl:onClass eco:Item ;
                owl:onProperty eco:hasItem ;
                owl:qualifiedCardinality "3"^^xsd:nonNegativeInteger
            ]
        )
    ] .

eco:Box
    a eco:Box, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A box is an heterogeneous, without uniqueness, non ordered and with fixed cardinality collection."@en, "Una caja es una colección heterogénea, sin unicidad, no ordenada y de cardinalidad fija."@es ;
    rdfs:label "Box"@en, "Caja"@es ;
    rdfs:subClassOf eco:FixedCardinalityCollection, eco:Multiheteroset .

eco:Collection
    a eco:Collection, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A collection is a group of objects or elements."@en, "Una colección es una agrupación de objetos o elementos."@es ;
    rdfs:label "Colección"@es, "Collection"@en ;
    owl:disjointWith eco:Item .

eco:Combination
    a eco:Combination, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A combination is an homogeneous, with uniqueness, non ordered and with fixed cardinality collection."@en, "Una combinación es una colección homogénea, con unicidad, no ordenada y de cardinalidad fija."@es ;
    rdfs:label "Combinación"@es, "Combination"@en ;
    rdfs:subClassOf eco:Heterocombination, eco:Multicombination, eco:Set .

eco:Element
    a owl:Class ;
    rdfs:comment "Element or object beloging to a collection."@en, "Elemento u objeto perteneciente a una colección."@es ;
    rdfs:label "Element"@en, "Elemento"@es .

eco:FixedCardinalityCollection
    a owl:Class ;
    rdfs:comment "A fixed cardiality collection is a collection of a fixed number of elements."@en, "Una colección de cardinalidad fija es una colección con un número fijo de elementos."@es ;
    rdfs:label "Colección de cardinalidad fija"@es, "Fixed cardinality collection"@en ;
    rdfs:subClassOf eco:Collection .

eco:Heterocombination
    a eco:Heterocombination, owl:Class, owl:NamedIndividual ;
    rdfs:comment "An heterocombination is an heterogeneous, with uniqueness, non ordered and with fixed cardinality collection."@en, "Una heterocombinación es una colección heterogénea, con unicidad, no ordenada y de cardinalidad fija."@es ;
    rdfs:label "Heterocombinación"@es, "Heterocombination"@en ;
    rdfs:subClassOf eco:Box, eco:Heteroset .

eco:Heteroranking
    a eco:Heteroranking, owl:Class, owl:NamedIndividual ;
    rdfs:comment "An heteroranking is an heterogeneous, with uniqueness, ordered and with variable cardinality collection."@en, "Un heteroranking es una colección heterogénea, con unicidad, ordenada y de cardinalidad variable."@es ;
    rdfs:label "Heteroranking"@en, "Heteroranking"@es ;
    rdfs:subClassOf eco:Heteroset, eco:List .

eco:Heteroset
    a eco:Heteroset, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A heteroset is an heterogeneous, with uniqueness, non ordered and with variable cardinality collection."@en, "Un heteroconjunto es una colección heterogénea, con unicidad, no ordenada y de cardinalidad variable."@es ;
    rdfs:label "Heteroconjunto"@es, "Heteroset"@en ;
    rdfs:subClassOf eco:Multiheteroset, eco:UniquenessCollection .

eco:Heterovariation
    a eco:Heterovariation, owl:Class, owl:NamedIndividual ;
    rdfs:comment "An heterovariation is an heterogeneous, with uniqueness, ordered and with fixed cardinality collection."@en, "Una heterovariación es una colección heterogénea, con unicidad, ordenada y de cardinalidad fija."@es ;
    rdfs:label "Heterovariación"@es, "Heterovariation"@en ;
    rdfs:subClassOf eco:Heterocombination, eco:Heteroranking, eco:Tuple .

eco:HomogeneousCollection
    a owl:Class ;
    rdfs:comment "An homogeneous collection is a collection with all its element of the same type."@en, "Una coleccion homogénea es una colección donde todos los elementos son del mismo tipo."@es ;
    rdfs:label "Colección homogénea"@es, "Homogeneous collection"@en ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (eco:Collection
            [
                a owl:Restriction ;
                owl:cardinality "1"^^xsd:nonNegativeInteger ;
                owl:onProperty eco:hasElementsOfType
            ]
        )
    ] .

eco:Item
    a owl:Class ;
    rdfs:comment "An item is a container for elements of collections. It's a workaround to allow duplicate elements in a collections."@en, "Un item es un contenedor para los elementos de las colecciones. Es un rodeo para permitir la duplicidad de elementos en la colecciones."@es ;
    rdfs:label "Item"@en, "Item"@es .

eco:List
    a eco:List, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A list is an heterogeneous, without uniqueness, ordered and with variable cardinality collection."@en, "Una lista es una colección heterogénea, sin unicidad, ordenada y de cardinalidad variable."@es ;
    rdfs:label "List"@en, "Lista"@es ;
    rdfs:subClassOf eco:Multiheteroset, eco:OrderedCollection .

eco:Multicombination
    a eco:Multicombination, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A multicombination is an homogeneous, without uniqueness, non ordered and with fixed cardinality collection."@en, "Una multicombinación es una colección homogénea, sin unicidad, no ordenada y de cardinalidad fija."@es ;
    rdfs:label "Multicombinación"@es, "Multicombination"@en ;
    rdfs:subClassOf eco:Box, eco:Multiset .

eco:Multiheteroset
    a eco:Multiheteroset, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A multiheteroset is an heterogeneous, without uniqueness, non ordered and with variable cardinality collection."@en, "Un multiheteroconjunto es una colección heterogénea, sin unicidad, no ordenada y de cardilnalidad variable."@es ;
    rdfs:label "Multiheteroconjunto"@es, "Multiheteroset"@en ;
    rdfs:subClassOf eco:Collection .

eco:Multiset
    a eco:Multiset, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A multiset is an homogeneous, without uniqueness, non ordered and with variable cardinality collection."@en, "Un multiconjunto es una colección homogenea, sin unicidad, no ordenada y de cardinalidad variable."@es ;
    rdfs:label "Multiconjunto"@es, "Multiset"@en ;
    rdfs:subClassOf eco:HomogeneousCollection, eco:Multiheteroset .

eco:OrderedCollection
    a owl:Class ;
    rdfs:comment "An ordered collection is a collection where elements follow a sequential order."@en, "Una colección ordenada es una colección donde los elementos siguen un orden secuencial."@es ;
    rdfs:label "Colección ordenada"@es, "Ordered collection"@en ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (eco:Collection
            [
                a owl:Restriction ;
                owl:allValuesFrom eco:OrderedItem ;
                owl:onProperty eco:hasItem
            ]
            [
                a owl:Restriction ;
                owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
                owl:onProperty eco:hasFirstItem
            ]
            [
                a owl:Restriction ;
                owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
                owl:onProperty eco:hasLastItem
            ]
        )
    ] .

eco:OrderedItem
    a owl:Class ;
    rdfs:comment "An ordered item is an item that is part of an ordered sequence of items."@en, "Un item ordenado es un item que forma parte de una secuencia ordenada de items."@es ;
    rdfs:label "Item ordenado"@es, "Ordered item"@en ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (eco:Item
            [
                a owl:Restriction ;
                owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
                owl:onProperty eco:hasNextItem
            ]
            [
                a owl:Restriction ;
                owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
                owl:onProperty eco:hasPreviousItem
            ]
            [
                a owl:Restriction ;
                owl:onDataRange xsd:positiveInteger ;
                owl:onProperty eco:hasIndex ;
                owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
            ]
        )
    ] .

eco:Ranking
    a eco:Ranking, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A ranking is an homogeneous, with uniqueness, ordered and with variable cardinality collection."@en, "Un ranking es una colección homogénea, con unicidad, ordenada y de cardinalidad variable."@es ;
    rdfs:label "Ranking"@en, "Ranking"@es ;
    rdfs:subClassOf eco:Heteroranking, eco:Sequence, eco:Set .

eco:Sequence
    a eco:Sequence, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A sequence is an homogeneous, without uniqueness, ordered and with variable cardinality collection."@en, "Una secuencia es una colección homogenea, sin unicidad, ordenada y de cardinalidad variable."@es ;
    rdfs:label "Secuencia"@es, "Sequence"@en ;
    rdfs:subClassOf eco:List, eco:Multiset .

eco:Set
    a eco:Set, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A set is an homogeneous, with uniqueness, non ordered and with variable cardinality collection."@en, "Un conjunto es una colección homogénea, con unicidad, no ordenada y de cardinalidad fija."@es ;
    rdfs:label "Conjunto"@es, "Set"@en ;
    rdfs:subClassOf eco:Heteroset, eco:Multiset .

eco:Tuple
    a eco:Tuple, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A tuple is an heterogeneous, without uniqueness, ordered and with fixed cardinality collection."@en, "Una tupla es una colección heterogénea, sin unicidad, ordenada y de cardinalidad fija."@es ;
    rdfs:label "Tupla"@es, "Tuple"@en ;
    rdfs:subClassOf eco:Box, eco:List .

eco:UniquenessCollection
    a owl:Class ;
    rdfs:comment "An uniqueness collection is a collection where each element appears at most one time, that is, element repetitions are not allowed."@en, "Una colección con unicidad es una colección donde cada elemento aparece a lo sumo una vez, es decir, donde no se permiten las repeticiones de elementos."@es ;
    rdfs:label "Colección con unicidad"@es, "Uniqueness collection"@en ;
    rdfs:subClassOf eco:Collection .

eco:Variation
    a eco:Variation, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A variation is an homogeneous, with uniqueness, ordered and with fixed cardinality collection."@en, "Una variación es una colección homogénea, con unicidad, ordenada y de cardinalidad fija."@es ;
    rdfs:label "Variación"@es, "Variation"@en ;
    rdfs:subClassOf eco:Combination, eco:Heterovariation, eco:Ranking, eco:Vector .

eco:Vector
    a eco:Vector, owl:Class, owl:NamedIndividual ;
    rdfs:comment "A vector is an homogeneous, without uniqueness, ordered and with fixed cardinality collection."@en, "Un vector es una colección homogénea, sin unicidad, ordenada y de cardinalidad fija."@es ;
    rdfs:label "Vector"@en, "Vector"@es ;
    rdfs:subClassOf eco:Multicombination, eco:Sequence, eco:Tuple .

eco:col1
    a eco:FixedCardinalityCollection, owl:NamedIndividual .

eco:col2
    eco:hasElementsOfType eco:elemento1 ;
    a eco:HomogeneousCollection, owl:NamedIndividual, [
        a owl:Restriction ;
        owl:allValuesFrom eco:Element ;
        owl:onProperty eco:hasElement
    ] .

eco:elemento1
    a eco:Element, owl:NamedIndividual .

eco:followedByItem
    a owl:ObjectProperty, owl:TransitiveProperty ;
    rdfs:comment "Property that relates an ordered item with another that follows it after in the same ordered collection."@en, "Propiedad que relaciona un item ordenado con otro que le sigue después en una misma colección ordenada."@es ;
    rdfs:domain eco:OrderedItem ;
    rdfs:label "followed by item"@en, "seguido por item"@es ;
    rdfs:range eco:OrderedItem ;
    owl:inverseOf eco:precededByItem .

eco:hasCardinality
    a owl:DatatypeProperty, owl:FunctionalProperty ;
    rdfs:comment "Property that relates a collection with the number of elements or objects that contains."@en, "Propiedad que relaciona una colección con el número de elementos que contiene."@es ;
    rdfs:domain eco:Collection ;
    rdfs:label "has cardinality"@en, "tiene cardinalidad"@es ;
    rdfs:range xsd:nonNegativeInteger .

eco:hasContent
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Property that relates an item with the element or object that contains."@en, "Propiedad que relaciona un Item con el elemento u objecto que contiene."@es ;
    rdfs:domain eco:Item ;
    rdfs:label "contiene"@es, "has content"@en ;
    rdfs:range [
        a owl:Class ;
        owl:complementOf eco:Item
    ] ;
    rdfs:subPropertyOf owl:topObjectProperty .

eco:hasElement
    a owl:ObjectProperty ;
    rdfs:comment "Property that relates a collection with an element that belongs to it."@en, "Propiedad que relaciona una colección con un elemento que pertenece a ella."@es ;
    rdfs:domain eco:Collection ;
    rdfs:label "has element"@en, "tiene elemento"@es ;
    rdfs:range [
        a owl:Class ;
        owl:complementOf eco:Item
    ] ;
    owl:inverseOf eco:isElementOf ;
    owl:propertyChainAxiom (eco:hasItem
        eco:hasContent
    ) .

eco:hasElementsOfType
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:domain eco:HomogeneousCollection ;
    rdfs:label "has elements of type"@en, "tiene elementos de tipo"@es .

eco:hasFirstItem
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Property that relates an ordered collection with its first item."@en, "Propiedad que relaciona una colección ordenada con su primer item."@es ;
    rdfs:label "has first item"@en, "tiene primer item"@es ;
    rdfs:range [
        a owl:Class ;
        owl:intersectionOf (eco:OrderedItem
            [
                a owl:Restriction ;
                owl:cardinality "0"^^xsd:nonNegativeInteger ;
                owl:onProperty eco:hasPreviousItem
            ]
            [
                a owl:Restriction ;
                owl:hasValue "1"^^xsd:positiveInteger ;
                owl:onProperty eco:hasIndex
            ]
        )
    ] ;
    rdfs:subPropertyOf eco:hasOrderedItem ;
    owl:inverseOf eco:isFirstItemOf .

eco:hasIndex
    a owl:DatatypeProperty, owl:FunctionalProperty ;
    rdfs:comment "Property that relates an ordered item with its position in an ordered collection."@en, "Propiedad que relaciona un item ordenado con su posición en una colección ordenada."@es ;
    rdfs:domain eco:OrderedItem ;
    rdfs:label "has index"@en, "tiene índice"@es ;
    rdfs:range xsd:positiveInteger .

eco:hasItem
    a owl:InverseFunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Property that relates a collection with an item that is part of it."@en, "Propiedad que relaciona una colección con un item que forma parte de ella."@es ;
    rdfs:domain eco:Collection ;
    rdfs:label "has item"@en, "tiene item"@es ;
    rdfs:range eco:Item ;
    owl:inverseOf eco:isItemOf .

eco:hasLastItem
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Property that relates an ordered collection with its last item."@en, "Propiedad que relaciona una colección ordenada con su último item."@es ;
    rdfs:label "has last item"@en, "tiene último item"@es ;
    rdfs:range [
        a owl:Class ;
        owl:intersectionOf (eco:OrderedItem
            [
                a owl:Restriction ;
                owl:cardinality "0"^^xsd:nonNegativeInteger ;
                owl:onProperty eco:hasNextItem
            ]
        )
    ] ;
    rdfs:subPropertyOf eco:hasOrderedItem .

eco:hasNextItem
    a owl:FunctionalProperty, owl:InverseFunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Property that relates an ordered item with other that follows it immediately in the same ordered collection."@en, "Propiedad que relaciona un item ordenado con otro que le sigue inmediatamente en un misma colección ordenada."@es ;
    rdfs:label "has next item"@en, "tiene siguiente item"@es ;
    rdfs:subPropertyOf eco:followedByItem .

eco:hasOrderedItem
    a owl:ObjectProperty ;
    rdfs:comment "Property that relates an ordered collection with an ordered item that is part of it."@en, "Propiedad que relaciona una colección ordenada con un item ordenado que forma parte de ella."@es ;
    rdfs:domain eco:OrderedCollection ;
    rdfs:label "has ordered item"@en, "tiene item ordenado"@es ;
    rdfs:range eco:OrderedItem ;
    rdfs:subPropertyOf eco:hasItem ;
    owl:inverseOf eco:isOrderedItemOf .

eco:hasPreviousItem
    a owl:FunctionalProperty, owl:InverseFunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Property that relates an ordered item with another that precedes it immediately in the same ordered collection."@en, "Propiedad que relaciona un item ordenado con otro que le precede inmediatamente en una misma colección ordenada."@es ;
    rdfs:label "has previous item"@en, "tiene previo item"@es ;
    rdfs:subPropertyOf eco:precededByItem ;
    owl:inverseOf eco:hasNextItem .

eco:isElementOf
    a owl:ObjectProperty ;
    rdfs:comment "Property that relates an element or object with a collection that belongs to."@en, "Propiedad que relaciona un elemento u objeto con una colección a la que pertenece."@es ;
    rdfs:label "es elemento de"@es, "is element of"@en ;
    rdfs:range eco:Collection .

eco:isFirstItemOf
    a owl:ObjectProperty ;
    rdfs:comment "Property that relates an ordered item with an ordered collection in which the item occupies the first position."@en, "Propiedad que relaciona un item ordenado con una colección ordenada en la que el item ocupa la primera posición."@es ;
    rdfs:label "es primer item de"@es, "is first item of"@en ;
    rdfs:subPropertyOf eco:isOrderedItemOf .

eco:isItemOf
    a owl:ObjectProperty ;
    rdfs:comment "Property that relates an item with the collection that is part of."@en, "Propiedad que relaciona un item con la colección de la que forma parte."@es ;
    rdfs:label "es item de"@es, "is item of"@en .

eco:isLastItemOf
    a owl:ObjectProperty ;
    rdfs:comment "Property that relates an ordered item with an ordered collection in which the item occupies the last position."@en, "Propiedad que relaciona un item ordenado con una colección ordenada en la que el item ocupa la última posición."@es ;
    rdfs:label "es último item de"@es, "is last item of"@en ;
    rdfs:subPropertyOf eco:isOrderedItemOf ;
    owl:inverseOf eco:hasLastItem .

eco:isOrderedItemOf
    a owl:ObjectProperty ;
    rdfs:comment "Property that relates an ordered item with the ordered collection that belongs to."@en, "Propiedad que relaciona un item ordenado con la colección ordenada a la que pertenece."@es ;
    rdfs:label "es item ordenado de"@es, "is ordered item of"@en ;
    rdfs:subPropertyOf eco:isItemOf .

eco:precededByItem
    a owl:ObjectProperty, owl:TransitiveProperty ;
    rdfs:comment "Property that relates an ordered item with another that precedes it in the same ordered collection."@en, "Propiedad que relaciona un item ordenado con otro que le precede en una misma colección ordenada."@es ;
    rdfs:domain eco:OrderedItem ;
    rdfs:label "preceded by item"@en, "precedido por item"@es ;
    rdfs:range eco:OrderedItem .

dc:creator
    a owl:AnnotationProperty .

dc:rights
    a owl:AnnotationProperty .

<http://www.essepuntato.it/2009/10/error/hasError>
    a owl:DatatypeProperty .

rdf:PlainLiteral
    a rdfs:Datatype .

rdfs:comment
    a owl:AnnotationProperty .

rdfs:label
    a owl:AnnotationProperty .

xsd:integer
    a rdfs:Datatype .

xsd:nonNegativeInteger
    a rdfs:Datatype .

xsd:positiveInteger
    a rdfs:Datatype .

owl:Thing
    a owl:Class .

owl:topObjectProperty
    a owl:ObjectProperty .

<urn:swrl#collecction>
    a swrl:Variable .

<urn:swrl#collection>
    a swrl:Variable .

<urn:swrl#collectionl>
    a swrl:Variable .

<urn:swrl#current>
    a swrl:Variable .

<urn:swrl#element1>
    a swrl:Variable .

<urn:swrl#element2>
    a swrl:Variable .

<urn:swrl#i>
    a swrl:Variable .

<urn:swrl#index>
    a swrl:Variable .

<urn:swrl#item>
    a swrl:Variable .

<urn:swrl#item1>
    a swrl:Variable .

<urn:swrl#item2>
    a swrl:Variable .

<urn:swrl#j>
    a swrl:Variable .

<urn:swrl#last>
    a swrl:Variable .

<urn:swrl#n>
    a swrl:Variable .

<urn:swrl#next>
    a swrl:Variable .

<urn:swrl#nextindex>
    a swrl:Variable .

<urn:swrl#nextitem>
    a swrl:Variable .

<urn:swrl#x>
    a swrl:Variable .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#item1> ;
            swrl:argument2 <urn:swrl#item2> ;
            swrl:propertyPredicate eco:followedByItem
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#item2> ;
            swrl:argument2 <urn:swrl#item1> ;
            swrl:propertyPredicate eco:followedByItem
        ]
    ) ;
    swrl:head ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#item1> ;
            swrl:argument2 "An ordered item can not be followed and preceded at the same time by another item" ;
            swrl:propertyPredicate <http://www.essepuntato.it/2009/10/error/hasError>
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#x> ;
            swrl:argument2 <urn:swrl#x> ;
            swrl:propertyPredicate eco:followedByItem
        ]
    ) ;
    swrl:head ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#x> ;
            swrl:argument2 "An ordered item cannot be followed by itself" ;
            swrl:propertyPredicate <http://www.essepuntato.it/2009/10/error/hasError>
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item2> ;
            swrl:propertyPredicate eco:hasOrderedItem
        ]
        [
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#item2> ;
            swrl:argument2 <urn:swrl#j> ;
            swrl:propertyPredicate eco:hasIndex
        ]
        [
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#item1> ;
            swrl:argument2 <urn:swrl#i> ;
            swrl:propertyPredicate eco:hasIndex
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item1> ;
            swrl:propertyPredicate eco:hasOrderedItem
        ]
        [
            a swrl:BuiltinAtom ;
            swrl:arguments (<urn:swrl#j>
                <urn:swrl#i>
                1
            ) ;
            swrl:builtin swrlb:add
        ]
    ) ;
    swrl:head ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#item1> ;
            swrl:argument2 <urn:swrl#item2> ;
            swrl:propertyPredicate eco:hasNextItem
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:classPredicate eco:UniquenessCollection
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#item1> ;
            swrl:argument2 <urn:swrl#element1> ;
            swrl:propertyPredicate eco:hasContent
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#item2> ;
            swrl:argument2 <urn:swrl#element2> ;
            swrl:propertyPredicate eco:hasContent
        ]
        [
            a swrl:DifferentIndividualsAtom ;
            swrl:argument1 <urn:swrl#item1> ;
            swrl:argument2 <urn:swrl#item2>
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item1> ;
            swrl:propertyPredicate eco:hasItem
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item2> ;
            swrl:propertyPredicate eco:hasItem
        ]
        [
            a swrl:SameIndividualAtom ;
            swrl:argument1 <urn:swrl#element1> ;
            swrl:argument2 <urn:swrl#element2>
        ]
    ) ;
    swrl:head ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 "A colllection with uniqueness has repeated elements" ;
            swrl:propertyPredicate <http://www.essepuntato.it/2009/10/error/hasError>
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:classPredicate eco:FixedCardinalityCollection
        ]
        [
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 1 ;
            swrl:propertyPredicate eco:hasCardinality
        ]
    ) ;
    swrl:head ([
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:classPredicate [
                a owl:Restriction ;
                owl:onClass eco:Item ;
                owl:onProperty eco:hasItem ;
                owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
            ]
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 3 ;
            swrl:propertyPredicate eco:hasCardinality
        ]
        [
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:classPredicate eco:FixedCardinalityCollection
        ]
    ) ;
    swrl:head ([
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:classPredicate [
                a owl:Restriction ;
                owl:onClass eco:Item ;
                owl:onProperty eco:hasItem ;
                owl:qualifiedCardinality "3"^^xsd:nonNegativeInteger
            ]
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#item> ;
            swrl:argument2 <urn:swrl#index> ;
            swrl:propertyPredicate eco:hasIndex
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#item> ;
            swrl:argument2 <urn:swrl#nextitem> ;
            swrl:propertyPredicate eco:hasNextItem
        ]
        [
            a swrl:BuiltinAtom ;
            swrl:arguments (<urn:swrl#nextindex>
                <urn:swrl#index>
                1
            ) ;
            swrl:builtin swrlb:add
        ]
    ) ;
    swrl:head ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#nextitem> ;
            swrl:argument2 <urn:swrl#nextindex> ;
            swrl:propertyPredicate eco:hasIndex
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:classPredicate eco:FixedCardinalityCollection
        ]
        [
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 2 ;
            swrl:propertyPredicate eco:hasCardinality
        ]
    ) ;
    swrl:head ([
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:classPredicate [
                a owl:Restriction ;
                owl:onClass eco:Item ;
                owl:onProperty eco:hasItem ;
                owl:qualifiedCardinality "2"^^xsd:nonNegativeInteger
            ]
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collecction> ;
            swrl:classPredicate [
                a owl:Class ;
                owl:complementOf eco:UniquenessCollection
            ]
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#last> ;
            swrl:propertyPredicate eco:hasLastItem
        ]
        [
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#n> ;
            swrl:propertyPredicate eco:hasCardinality
        ]
    ) ;
    swrl:head ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#last> ;
            swrl:argument2 <urn:swrl#n> ;
            swrl:propertyPredicate eco:hasIndex
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item> ;
            swrl:propertyPredicate eco:hasOrderedItem
        ]
        [
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#item> ;
            swrl:argument2 <urn:swrl#n> ;
            swrl:propertyPredicate eco:hasIndex
        ]
        [
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#n> ;
            swrl:propertyPredicate eco:hasCardinality
        ]
    ) ;
    swrl:head ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item> ;
            swrl:propertyPredicate eco:hasLastItem
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#last> ;
            swrl:argument2 <urn:swrl#n> ;
            swrl:propertyPredicate eco:hasIndex
        ]
        [
            a swrl:ClassAtom ;
            swrl:argument1 <urn:swrl#collecction> ;
            swrl:classPredicate [
                a owl:Class ;
                owl:complementOf eco:UniquenessCollection
            ]
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#last> ;
            swrl:propertyPredicate eco:hasLastItem
        ]
    ) ;
    swrl:head ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#n> ;
            swrl:propertyPredicate eco:hasCardinality
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#item> ;
            swrl:argument2 "1" ;
            swrl:propertyPredicate eco:hasIndex
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item> ;
            swrl:propertyPredicate eco:hasOrderedItem
        ]
    ) ;
    swrl:head ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collectionl> ;
            swrl:argument2 <urn:swrl#item> ;
            swrl:propertyPredicate eco:hasFirstItem
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#item1> ;
            swrl:argument2 <urn:swrl#item2> ;
            swrl:propertyPredicate eco:followedByItem
        ]
        [
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item1> ;
            swrl:propertyPredicate eco:hasOrderedItem
        ]
    ) ;
    swrl:head ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#collection> ;
            swrl:argument2 <urn:swrl#item2> ;
            swrl:propertyPredicate eco:hasOrderedItem
        ]
    ) .

[]
    a swrl:Imp ;
    swrl:body ([
            a swrl:IndividualPropertyAtom ;
            swrl:argument1 <urn:swrl#current> ;
            swrl:argument2 <urn:swrl#next> ;
            swrl:propertyPredicate eco:hasNextItem
        ]
        [
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#current> ;
            swrl:argument2 <urn:swrl#index> ;
            swrl:propertyPredicate eco:hasIndex
        ]
        [
            a swrl:BuiltinAtom ;
            swrl:arguments (<urn:swrl#nextindex>
                <urn:swrl#index>
                1
            ) ;
            swrl:builtin swrlb:add
        ]
    ) ;
    swrl:head ([
            a swrl:DatavaluedPropertyAtom ;
            swrl:argument1 <urn:swrl#next> ;
            swrl:argument2 <urn:swrl#nextindex> ;
            swrl:propertyPredicate eco:hasIndex
        ]
    ) .

