@prefix rdf: . @prefix owl: . @prefix rdfs: . @prefix skos: . @prefix ldp: . @prefix xsd: . ldp:Resource a rdfs:Class; rdfs:label "ldp Resource"; rdfs:comment """ A HTTP resource whose state is represented in any way that conforms to the simple lifecycle patterns and conventions in section 5. Linked Data Platform Resources. """ . ldp:Source a rdfs:Class; rdfs:label "ldp Resource"; rdfs:subClassOf ldp:Resource; rdfs:comment """ an ldp:Resource that is also an rdf source: ie that is an RDF graph. """ . ldp:Container a rdfs:Class, owl:Class; rdfs:label "ldp Container"; rdfs:subClassOf ldp:Source; rdfs:comment """ An LDPR representing a collection of member resources and/or contained documents (RDF Document [rdf11-concepts] or information resources [WEBARCH]) that responds to client requests for creation, modification, and/or enumeration of its members and documents, and that conforms to the simple lifecycle patterns and conventions in section6. Linked Data Platform Containers. """; skos:editorialNote """ As the outermost class of the container hierarchy it may be that the ldp:Container could be made to be the same as the ldp:IndirectContainer. But leaving space could allow for further extensions. """ . ldp:IndirectContainer a rdfs:Class, owl:Class; rdfs:comment """ A LDPC that has the flexibility of choosing what form its membership triples take, and allows members to be any resources [WEBARCH], defined in the posted document. """ . ldp:DirectContainer a rdfs:Class, owl:Class; rdfs:comment """ A LDPC that has the flexibility of choosing what form its membership triples take, and allows members to be any resources [WEBARCH], not only documents. """ . ldp:BasicContainer a rdfs:Class, owl:Class; rdfs:label "BasicContainer"; rdfs:comment """ A LDPC that uses a single pre-defined predicate to link to both its contained and member documents (information resources). Posting to an ldp:BasicContainer has no extra consequences other than creating an ldp:contains relation from the container to the newly created resource. """ . ldp:contains a rdf:Property, owl:ObjectProperty; rdfs:label "contains"; rdfs:domain ldp:Container; rdfs:range ldp:Resource; rdfs:comment """ the ldp:contains relation relates an ldp:Container to a ldp:Resource ( ie a document of some form ) """ . ldp:membershipResource a rdf:Property, owl:FunctionalProperty; rdfs:label "membershipResource"; rdfs:domain ldp:IndirectBindingRule; rdfs:range rdfs:Resource . rdf:Property a owl:Class . ldp:hasMemberRelation a rdf:Property, owl:FunctionalProperty, owl:ObjectProperty; rdfs:label "hasMemberRelation"; rdfs:domain ldp:IndirectBindingRule; rdfs:range rdf:Property . ldp:isMemberOfRelation a rdf:Property, owl:FunctionalProperty, owl:ObjectProperty; rdfs:label "isMemberOfRelation"; # pellet has problems reasoning with property chains. remove the following for the moment # owl:propertyChainAxiom ( ldp:hasMemberRelation owl:inverseOf ) ; skos:editorialNote """ the ldp:isMemberOfRelation is the equivalent to the hasMemberRelation followed by the owl:inverseOf property """; rdfs:domain ldp:IndirectBindingRule; rdfs:range rdf:Property . ldp:insertedContentRelation a owl:FunctionalProperty, owl:ObjectProperty; rdfs:label "insertedContentRelation"; rdfs:domain ldp:IndirectBindingRule; rdfs:range rdf:Property . ### ldp:HTTPActionRule a rdfs:Class; rdfs:comment """ a rule on what consequences will occur on POSTing to a container. """. ldp:bindingRule a rdf:Property, owl:ObjectProperty; rdfs:label "binding rule"; rdfs:domain ldp:Container; rdfs:range ldp:HTTPActionRule . ldp:IndirectBindingRule rdfs:subClassOf ldp:HTTPActionRule, [ a owl:Restriction; owl:onProperty ldp:hasMemberRelation; owl:cardinality 1; ], [ a owl:Restriction; owl:onProperty ldp:insertedContentRelation; owl:cardinality 1; ], [ a owl:Restriction; owl:onProperty ldp:membershipResource; owl:cardinality 1; ]. ldp:DirectBindingRule owl:equivalentClass [ a owl:Restriction; owl:onProperty ldp:insertedContentRelation; owl:hasValue ldp:MemberSubject ]. ldp:memberResourceToBindingRule owl:propertyChainAxiom ( ldp:memberResource ldp:bindingRule ); rdfs:comment """ we just use this here because the owl:hasSelf restriction no longer works with the rule indirection. """. ldp:ContainerRule owl:equivalentClass [ owl:intersectionOf ( [ a owl:Restriction; # problem with pellet reasoning on properties defined via property chains # owl:onProperty ldp:memberResourceToBindingRule; owl:onProperty ldp:memberResource; owl:hasSelf "true"^^xsd:boolean ] [ a owl:Restriction; owl:onProperty ldp:hasMemberRelation; owl:hasValue ldp:contains ] [ a owl:Restriction; owl:onProperty ldp:insertedContentRelation; owl:hasValue ldp:MemberSubject ])]; rdfs:label "ContainerRule"; rdfs:comment """ the rule that on POSTing creates an ldp:contains relation, etc... """. ldp:Container rdfs:comment "a Container has 1 ContainerRule ( and may have others )"; owl:equivalentClass [ a owl:Restriction; owl:onProperty ldp:bindingRule; owl:qualifiedCardinality 1; owl:onClass ldp:ContainerRule ]. ldp:IndirectContainer rdfs:comment """ an IndirectContainer has at most 2 binding rules of which 1 IndirectBindingRule ( and since it has a bindingRule it is a Container too ) """; owl:equivalentClass [ owl:intersectionOf ( [ a owl:Restriction; owl:onProperty ldp:bindingRule; owl:maxCardinality 2 ] [ a owl:Restriction; owl:onProperty ldp:bindingRule; owl:qualifiedCardinality 1; owl:onClass ldp:IndirectBindingRule ] ) ]. ldp:DirectContainer rdfs:comment """ an DirectContainer has at most 2 biding rules of which 1 DirectBindingRule ( and since it has a bindingRule it is a Container too ) """; owl:equivalentClass [ owl:intersectionOf ( [ a owl:Restriction; owl:onProperty ldp:bindingRule; owl:maxCardinality 2 ] [ a owl:Restriction; owl:onProperty ldp:bindingRule; owl:qualifiedCardinality 1; owl:onClass ldp:DirectBindingRule ] ) ]. ldp:BasicContainer rdfs:comment "a BasicContainer only has one bindingRule - and so the ContainerRule"; owl:equivalentClass [ a owl:Restriction; owl:onProperty ldp:bindingRule; owl:cardinality 1 ] . ## example @base . @prefix ex: . @prefix sioc: . a ldp:DirectContainer; ldp:bindingRule [ a ldp:DirectBindingRule; ldp:isMemberOfRelation sioc:has_container; ldp:membershipResource ; ]; ldp:contains . # sioc:has_container owl:inverseOf ldp:contains . # @prefix dcterms: . @prefix o: . a ldp:DirectContainer; dcterms:title "The assets of JohnZSmith"; ldp:bindingRule [ a ldp:DirectBindingRule; ldp:membershipResource ; ldp:hasMemberRelation o:asset; ]; ldp:contains , .