@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix nao:     <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
@prefix nrl:     <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<http://www.semanticdesktop.org/ontologies/2007/08/15/nrl> {
    nrl:imports
          a       rdf:Property ;
          rdfs:comment "Models a subsumption relationship between two graphs, stating that the object graph is imported and included in the subject graph" ;
          rdfs:domain nrl:Data ;
          rdfs:label "imports" ;
          rdfs:range nrl:Data ;
          rdfs:subPropertyOf nrl:superGraphOf .

    nrl:ruleLanguage
          a       rdf:Property ;
          rdfs:comment "Specifies the rule language for a view specification that is driven by rules" ;
          rdfs:domain nrl:RuleViewSpecification ;
          rdfs:label "ruleLanguage" ;
          rdfs:range rdfs:Literal .

    nrl:cardinality
          a       rdf:Property ;
          rdfs:comment "Specifies the precise value cardinality for a specific property" ;
          rdfs:domain rdf:Property ;
          rdfs:label "cardinality" ;
          rdfs:range rdfs:Literal .

    nrl:InverseFunctionalProperty
          a       rdfs:Class ;
          rdfs:comment "A marker class to identify inverse functional properties" ;
          rdfs:label "InverseFunctionalProperty" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:Graph
          a       rdfs:Class ;
          rdfs:comment "Represents a named graph" ;
          rdfs:label "Graph" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:hasSpecification
          a       rdf:Property ;
          rdfs:comment "Points to the representation of the view specification required to generate the graph view in question" ;
          rdfs:domain nrl:GraphView ;
          rdfs:label "hasSpecification" ;
          rdfs:range nrl:ViewSpecification .

    nrl:DocumentGraph
          a       rdfs:Class ;
          rdfs:comment "A marker class to identify named graphs that exist within a physical document" ;
          rdfs:label "DocumentGraph" ;
          rdfs:subClassOf nrl:Graph .

    nrl:coreGraphMetadataFor
          a       rdf:Property , nrl:InverseFunctionalProperty ;
          rdfs:subPropertyOf nrl:graphMetadataFor ;
          rdfs:comment "Links a metadata graph to the graph for which it specifies the core graph properties including the semantics and the graph namespace. A graph can have only one unique core metadata graph" ;
          rdfs:domain nrl:GraphMetadata ;
          rdfs:label "coreGraphMetadataFor" ;
          rdfs:range nrl:Graph .

    nrl:TransitiveProperty
          a       rdfs:Class ;
          rdfs:comment "A marker class to identify transitive properties" ;
          rdfs:label "TransitiveProperty" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:FunctionalProperty
          a       rdfs:Class ;
          rdfs:comment "A marker class to identify functional properties" ;
          rdfs:label "FunctionalProperty" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:KnowledgeBase
          a       rdfs:Class ;
          rdfs:comment "Represents a named graph containing both schematic and instance data" ;
          rdfs:label "KnowledgeBase" ;
          rdfs:subClassOf nrl:Ontology , nrl:InstanceBase .

    nrl:externalRealizer
          a       rdf:Property ;
          rdfs:comment "Points to the location of the realizer for the external view specification" ;
          rdfs:domain nrl:ExternalViewSpecification ;
          rdfs:label "externalRealizer" ;
          rdfs:range rdfs:Literal .

    nrl:subGraphOf
          a       rdf:Property ;
          rdfs:comment "Specifies a containment relationship between two graphs, meaning that the subject graph is included in the object graph" ;
          rdfs:domain nrl:Graph ;
          rdfs:label "subGraphOf" ;
          rdfs:range nrl:Graph ;
          nrl:inverseProperty nrl:superGraphOf .

    nrl:Configuration
          a       rdfs:Class ;
          rdfs:comment "Represents a named graph containing configuration data" ;
          rdfs:label "Configuration" ;
          rdfs:subClassOf nrl:Data .

    nrl:ViewSpecification
          a       rdfs:Class ;
          rdfs:comment "Represents a specification of the means to achieve a transformation of an input graph into the required graph view" ;
          rdfs:label "ViewSpecification" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:hasSemantics
          a       rdf:Property ;
          rdfs:comment "Points to a representation of the declarative semantics for a graph role" ;
          rdfs:domain nrl:Data ;
          rdfs:label "hasSemantics" ;
          rdfs:range nrl:Semantics .
    
    nrl:ExternalViewSpecification
          a       rdfs:Class ;
          rdfs:comment "Represents an external view specification, this usually being a program which automatically generates the required view for an input graph" ;
          rdfs:label "ExternalViewSpecification" ;
          rdfs:subClassOf nrl:ViewSpecification .

    nrl:DefaultGraph
          a       nrl:Graph ;
          rdfs:comment "Represents the default graph, the graph which contains any triple that does not belong to any other named graph" ;
          rdfs:label "DefaultGraph" .

    nrl:updatable
          a       rdf:Property ;
          rdfs:comment "A core graph metadata property, this defines whether a graph can be freely updated '1' or otherwise '0'" ;
          rdfs:domain nrl:Graph ;
          rdfs:label "updatable" ;
          rdfs:range xsd:boolean ;
          nrl:maxCardinality "1"^^xsd:nonNegativeInteger .

    nrl:Semantics
          a       rdfs:Class ;
          rdfs:comment "Represents some declarative semantics" ;
          rdfs:label "Semantics" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:equivalentGraph
          a       rdf:Property , nrl:SymmetricProperty ;
          rdfs:comment "Links two equivalent named graphs. A symmetric property" ;
          rdfs:domain nrl:Graph ;
          rdfs:label "equivalentGraph" ;
          rdfs:range nrl:Graph .

    nrl:ReflexiveProperty
          a       rdfs:Class ;
          rdfs:comment "A marker class to identify reflexive properties" ;
          rdfs:label "ReflexiveProperty" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:AsymmetricProperty
          a       rdfs:Class ;
          rdfs:comment "A marker class to identify asymmetric properties" ;
          rdfs:label "AsymmetricProperty" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:maxCardinality
          a       rdf:Property ;
          rdfs:comment "Specifies a maximum value cardinality for a specific property" ;
          rdfs:domain rdf:Property ;
          rdfs:label "maxCardinality" ;
          rdfs:range rdfs:Literal .

    nrl:viewOn
          a       rdf:Property ;
          rdfs:comment "Points to a graph view over the subject named graph" ;
          rdfs:domain nrl:GraphView ;
          rdfs:label "viewOn" ;
          rdfs:range nrl:Graph .

    nrl:SymmetricProperty
          a       rdfs:Class ;
          rdfs:comment "A marker class to identify symmetric properties" ;
          rdfs:label "SymmetricProperty" ;
          rdfs:subClassOf rdfs:Resource .

    nrl:superGraphOf
          a       rdf:Property ;
          rdfs:comment "Specifies a subsumption relationship between two graphs, meaning that the object graph is included in the subject graph" ;
          rdfs:domain nrl:Graph ;
          rdfs:label "superGraphOf" ;
          rdfs:range nrl:Graph ;
          nrl:inverseProperty nrl:subGraphOf .

    nrl:Ontology
          a       rdfs:Class ;
          rdfs:comment "Represents a named graph having the role of an Ontology" ;
          rdfs:label "Ontology" ;
          rdfs:subClassOf nrl:Schema .

    nrl:realizes
          a       rdf:Property ;
          rdfs:comment "Points to a representation of the declarative semantics that the view specification realizes" ;
          rdfs:domain nrl:ViewSpecification ;
          rdfs:label "realizes" ;
          rdfs:range nrl:Semantics .

    nrl:minCardinality
          a       rdf:Property ;
          rdfs:comment "Specifies a minimum value cardinality for a specific property" ;
          rdfs:domain rdf:Property ;
          rdfs:label "minCardinality" ;
          rdfs:range rdfs:Literal .

    nrl:rule
          a       rdf:Property ;
          rdfs:comment "Specifies rules for a view specification that is driven by rules" ;
          rdfs:domain nrl:RuleViewSpecification ;
          rdfs:label "rule" ;
          rdfs:range rdfs:Literal .

    nrl:InstanceBase
          a       rdfs:Class ;
          rdfs:comment "Represents a named graph containing instance data" ;
          rdfs:label "InstanceBase" ;
          rdfs:subClassOf nrl:Data .

    nrl:RuleViewSpecification
          a       rdfs:Class ;
          rdfs:comment "Represents a view specification that is composed of a set of rules which generate the required view from the input graph upon firing" ;
          rdfs:label "RuleViewSpecification" ;
          rdfs:subClassOf nrl:ViewSpecification .

    nrl:semanticsDefinedBy
          a       rdf:Property ;
          rdfs:comment "Points to the human readable specifications for a representation of some declarative semantics" ;
          rdfs:domain nrl:Semantics ;
          rdfs:label "semanticsDefinedBy" ;
          rdfs:range rdfs:Resource .

    nrl:GraphMetadata
          a       rdfs:Class ;
          rdfs:comment "Represents a special named graph that contains metadata for another graph" ;
          rdfs:label "GraphMetadata" ;
          rdfs:subClassOf nrl:Data .

    nrl:graphMetadataFor
          a       rdf:Property ;
          rdfs:comment "Links a metadata graph to the graph that is being described. A unique value is compulsory" ;
          rdfs:domain nrl:GraphMetadata ;
          rdfs:label "graphMetadataFor" ;
          rdfs:range nrl:Graph ;
          nrl:minCardinality "1"^^xsd:nonNegativeInteger .

    nrl:GraphView
          a       rdfs:Class ;
          rdfs:comment "Identifies a graph which is itself a view of another named graph" ;
          rdfs:label "GraphView" ;
          rdfs:subClassOf nrl:Graph .

    nrl:Data
          a       rdfs:Class ;
          rdfs:comment "An abstract class representing all named graph roles" ;
          rdfs:label "Data" ;
          rdfs:subClassOf nrl:Graph .

    nrl:inverseProperty
          a       rdf:Property ;
          rdfs:comment "Links two properties and specifies their inverse behaviour" ;
          rdfs:domain rdf:Property ;
          rdfs:label "inverseProperty" ;
          rdfs:range rdf:Property .

    nrl:Schema
          a       rdfs:Class ;
          rdfs:comment "Represents a named graph containing schematic data" ;
          rdfs:label "Schema" ;
          rdfs:subClassOf nrl:Data .
}

<http://www.semanticdesktop.org/ontologies/2007/08/15/nrl/metadata>
{
    <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl>
          a       nrl:DocumentGraph , nrl:KnowledgeBase ;
          nao:hasDefaultNamespace "http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#" ;
          nao:hasDefaultNamespaceAbbreviation "nrl" ;
          nao:lastModified "2007-08-22T13:38:32.866Z" ;
          nao:serializationLanguage "TriG" ;
          nao:status "Testing" ;
          nrl:updatable "0" ;
          nao:version "2" .

    <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl/metadata>
          a       nrl:GraphMetadata , nrl:DocumentGraph ;
          nao:serializationLanguage "TriG" ;
          nrl:coreGraphMetadataFor <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl> .

}

