Class OntologyImpl

    • Field Detail

      • factory

        public static Implementation factory
        A factory for generating Ontology facets from nodes in enhanced graphs.
    • Constructor Detail

      • OntologyImpl

        public OntologyImpl​(Node n,
                            EnhGraph g)

        Construct an ontology metadata node represented by the given node in the given graph.

        Parameters:
        n - The node that represents the resource
        g - The enh graph that contains n
    • Method Detail

      • setImport

        public void setImport​(Resource res)

        Assert that this ontology imports only the given ontology. Any existing statements for sameAs will be removed.

        Specified by:
        setImport in interface Ontology
        Parameters:
        res - Represents a resource that this ontology imports.
        Throws:
        ProfileException - If the Profile.IMPORTS() property is not supported in the current language profile.
      • addImport

        public void addImport​(Resource res)

        Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) imports.

        Specified by:
        addImport in interface Ontology
        Parameters:
        res - Represents a resource that this ontology imports.
        Throws:
        ProfileException - If the Profile.IMPORTS() property is not supported in the current language profile.
      • getImport

        public OntResource getImport()

        Answer a resource that represents an ontology imported by this ontology. If there is more than one such resource, an arbitrary selection is made.

        Specified by:
        getImport in interface Ontology
        Returns:
        An ont resource representing a resource that this ontology imports
        Throws:
        ProfileException - If the Profile.IMPORTS() property is not supported in the current language profile.
      • imports

        public boolean imports​(Resource res)

        Answer true if this ontology (the ontology represented by this resource) imports the given resource.

        Specified by:
        imports in interface Ontology
        Parameters:
        res - A resource to test against
        Returns:
        True if this ontology imports the ontology represented by res
      • removeImport

        public void removeImport​(Resource res)

        Remove the statement that this ontology imports the ontology represented by the given resource. If this statement is not true of the current model, nothing happens.

        Specified by:
        removeImport in interface Ontology
        Parameters:
        res - A resource that represents an ontology that is no longer to be imported
      • setBackwardCompatibleWith

        public void setBackwardCompatibleWith​(Resource res)

        Assert that this ontology is backward compatible with the given ontology. Any existing statements for sameAs will be removed.

        Specified by:
        setBackwardCompatibleWith in interface Ontology
        Parameters:
        res - Represents a resource that this ontology is compatible with.
        Throws:
        ProfileException - If the Profile.BACKWARD_COMPATIBLE_WITH() property is not supported in the current language profile.
      • addBackwardCompatibleWith

        public void addBackwardCompatibleWith​(Resource res)

        Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) is backwards compatible with.

        Specified by:
        addBackwardCompatibleWith in interface Ontology
        Parameters:
        res - Represents a resource that this ontology is compatible with.
        Throws:
        ProfileException - If the Profile.BACKWARD_COMPATIBLE_WITH() property is not supported in the current language profile.
      • getBackwardCompatibleWith

        public OntResource getBackwardCompatibleWith()

        Answer a resource that represents an ontology that is backwards compatible with this ontology. If there is more than one such resource, an arbitrary selection is made.

        Specified by:
        getBackwardCompatibleWith in interface Ontology
        Returns:
        An ont resource representing an ontology that this ontology is compatible with
        Throws:
        ProfileException - If the Profile.BACKWARD_COMPATIBLE_WITH() property is not supported in the current language profile.
      • isBackwardCompatibleWith

        public boolean isBackwardCompatibleWith​(Resource res)

        Answer true if this ontology (the ontology represented by this resource) is backward compatible with the given resource.

        Specified by:
        isBackwardCompatibleWith in interface Ontology
        Parameters:
        res - A resource to test against
        Returns:
        True if this ontology is compatible with the ontology represented by res
      • removeBackwardCompatibleWith

        public void removeBackwardCompatibleWith​(Resource res)

        Remove the statement that this ontology is backwards compatible with the ontology represented by the given resource. If this statement is not true of the current model, nothing happens.

        Specified by:
        removeBackwardCompatibleWith in interface Ontology
        Parameters:
        res - A resource that represents an ontology that is no longer to be imported
      • setPriorVersion

        public void setPriorVersion​(Resource res)

        Assert that this ontology is a new version of the given ontology. Any existing statements for priorVersion will be removed.

        Specified by:
        setPriorVersion in interface Ontology
        Parameters:
        res - Represents a resource that this ontology supercedes.
        Throws:
        ProfileException - If the Profile.PRIOR_VERSION() property is not supported in the current language profile.
      • addPriorVersion

        public void addPriorVersion​(Resource res)

        Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) supercedes.

        Specified by:
        addPriorVersion in interface Ontology
        Parameters:
        res - Represents a resource that this ontology supercedes.
        Throws:
        ProfileException - If the Profile.PRIOR_VERSION() property is not supported in the current language profile.
      • getPriorVersion

        public OntResource getPriorVersion()

        Answer a resource that represents an ontology that is superceded by this ontology. If there is more than one such resource, an arbitrary selection is made.

        Specified by:
        getPriorVersion in interface Ontology
        Returns:
        An ont resource representing an ontology that this ontology supercedes
        Throws:
        ProfileException - If the Profile.PRIOR_VERSION() property is not supported in the current language profile.
      • hasPriorVersion

        public boolean hasPriorVersion​(Resource res)

        Answer true if this ontology (the ontology represented by this resource) supercedes the given resource.

        Specified by:
        hasPriorVersion in interface Ontology
        Parameters:
        res - A resource to test against
        Returns:
        True if this ontology supercedes the ontology represented by res
      • removePriorVersion

        public void removePriorVersion​(Resource res)

        Remove the statement that the given ontology is a prior version of this ontology. If this statement is not true of the current model, nothing happens.

        Specified by:
        removePriorVersion in interface Ontology
        Parameters:
        res - A resource that represents an ontology that is no longer a prior version of this ontology
      • setIncompatibleWith

        public void setIncompatibleWith​(Resource res)

        Assert that this ontology is incompatible with the given ontology. Any existing statements for incompatibleWith will be removed.

        Specified by:
        setIncompatibleWith in interface Ontology
        Parameters:
        res - Represents a resource that this ontology is incompatible with.
        Throws:
        ProfileException - If the Profile.INCOMPATIBLE_WITH() property is not supported in the current language profile.
      • addIncompatibleWith

        public void addIncompatibleWith​(Resource res)

        Add a resource representing an ontology that this ontology (strictly, the ontology represented by this node) is incompatible with.

        Specified by:
        addIncompatibleWith in interface Ontology
        Parameters:
        res - Represents a resource that this ontology is incompatible with.
        Throws:
        ProfileException - If the Profile.INCOMPATIBLE_WITH() property is not supported in the current language profile.
      • getIncompatibleWith

        public OntResource getIncompatibleWith()

        Answer a resource that represents an ontology that is incompatible with this ontology. If there is more than one such resource, an arbitrary selection is made.

        Specified by:
        getIncompatibleWith in interface Ontology
        Returns:
        An ont resource representing an ontology that this ontology is incompatible with
        Throws:
        ProfileException - If the Profile.INCOMPATIBLE_WITH() property is not supported in the current language profile.
      • isIncompatibleWith

        public boolean isIncompatibleWith​(Resource res)

        Answer true if this ontology (the ontology represented by this resource) is incompatible with the given resource.

        Specified by:
        isIncompatibleWith in interface Ontology
        Parameters:
        res - A resource to test against
        Returns:
        True if this ontology is incompatible with the ontology represented by res
      • removeIncompatibleWith

        public void removeIncompatibleWith​(Resource res)

        Remove the statement that the given ontology is incompatible with this ontology. If this statement is not true of the current model, nothing happens.

        Specified by:
        removeIncompatibleWith in interface Ontology
        Parameters:
        res - A resource that represents an ontology that is no longer incompatible with this ontology