edu.stanford.smi.protegex.owl.ui.jena
Class OntPolicy

java.lang.Object
  extended byedu.stanford.smi.protegex.owl.ui.jena.OntPolicy

public class OntPolicy
extends Object

The RDF schema used to represent ont-polify files.

Author:
Mohamed Khedr, Holger Knublauch

Field Summary
static com.hp.hpl.jena.rdf.model.Property ALT_URL
          Represents the alternative local copy of the public ontology; assumed to be resolvable, hence URL not URI
static com.hp.hpl.jena.rdf.model.Property CACHE_MODELS
          Defines boolean policy choice of caching loaded models
static com.hp.hpl.jena.rdf.model.Resource DOC_MGR_POLICY
          rdf:type for document manager policy nodes
static com.hp.hpl.jena.rdf.model.Property EDITABLE
          Represents the standard prefix for this namespace
static com.hp.hpl.jena.rdf.model.Property IGNORE_IMPORT
          Specifies the URI of an ontology that we do not want to import, even if processImports is true.
static com.hp.hpl.jena.rdf.model.Property LANGUAGE
          Represents the ontology language used to encode the ontology
static String NS
           
static com.hp.hpl.jena.rdf.model.Resource ONTOLOGY_SPEC
          rdf:type for ontology specification nodes in meta-data file
static com.hp.hpl.jena.rdf.model.Property PREFIX
          Represents the standard prefix for this namespace
static com.hp.hpl.jena.rdf.model.Property PROCESS_IMPORTS
          Defines boolean policy choice of loading the imports closure
static com.hp.hpl.jena.rdf.model.Property PUBLIC_URI
          Represents the public URI of an ontology; also used to derive the namespace
static com.hp.hpl.jena.rdf.model.Property USE_DECLARED_NS_PREFIXES
          The policy property for including the pre-declared namespace prefixes in a model.
private static com.hp.hpl.jena.rdf.model.Model vocab
           
 
Constructor Summary
OntPolicy()
           
 
Method Summary
static com.hp.hpl.jena.rdf.model.Resource createOntologySpec(com.hp.hpl.jena.rdf.model.Model model)
           
static String getAltURL(com.hp.hpl.jena.rdf.model.Resource ontologySpec, edu.stanford.smi.protege.model.Project project)
           
static com.hp.hpl.jena.rdf.model.Resource getOntologySpec(com.hp.hpl.jena.rdf.model.Model model, String publicURI)
           
static File getPossibleFilePath(edu.stanford.smi.protege.model.Project project)
           
static String getPrefix(com.hp.hpl.jena.rdf.model.Resource ontologySpec)
           
static String getPublicURL(com.hp.hpl.jena.rdf.model.Resource ontologySpec)
           
static String getRelativePhysicalFileName(com.hp.hpl.jena.rdf.model.Resource ontologySpec)
           
static boolean isEditable(com.hp.hpl.jena.rdf.model.Resource ontologySpec)
           
private static boolean isRelativeFileURL(String str)
           
static Iterator listOntologySpecs(com.hp.hpl.jena.rdf.model.Model model)
           
static com.hp.hpl.jena.rdf.model.Model loadOntPolicy(edu.stanford.smi.protege.model.Project project)
           
static com.hp.hpl.jena.rdf.model.Model loadOntPolicy(String path)
           
static void saveOntPolicyFile(com.hp.hpl.jena.rdf.model.Model model, edu.stanford.smi.protege.model.Project project)
           
static void saveOntPolicyFile(com.hp.hpl.jena.rdf.model.Model model, String path)
           
static boolean setAltURL(com.hp.hpl.jena.rdf.model.Resource ontologySpec, String uri)
           
static void setEditable(com.hp.hpl.jena.rdf.model.Resource ontologySpec, boolean value)
           
static void setPrefix(com.hp.hpl.jena.rdf.model.Resource ontologySpec, String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vocab

private static final com.hp.hpl.jena.rdf.model.Model vocab

NS

public static final String NS
See Also:
Constant Field Values

ONTOLOGY_SPEC

public static final com.hp.hpl.jena.rdf.model.Resource ONTOLOGY_SPEC
rdf:type for ontology specification nodes in meta-data file


PUBLIC_URI

public static final com.hp.hpl.jena.rdf.model.Property PUBLIC_URI
Represents the public URI of an ontology; also used to derive the namespace


ALT_URL

public static final com.hp.hpl.jena.rdf.model.Property ALT_URL
Represents the alternative local copy of the public ontology; assumed to be resolvable, hence URL not URI


EDITABLE

public static final com.hp.hpl.jena.rdf.model.Property EDITABLE
Represents the standard prefix for this namespace


PREFIX

public static final com.hp.hpl.jena.rdf.model.Property PREFIX
Represents the standard prefix for this namespace


LANGUAGE

public static final com.hp.hpl.jena.rdf.model.Property LANGUAGE
Represents the ontology language used to encode the ontology


DOC_MGR_POLICY

public static final com.hp.hpl.jena.rdf.model.Resource DOC_MGR_POLICY
rdf:type for document manager policy nodes


CACHE_MODELS

public static final com.hp.hpl.jena.rdf.model.Property CACHE_MODELS
Defines boolean policy choice of caching loaded models


PROCESS_IMPORTS

public static final com.hp.hpl.jena.rdf.model.Property PROCESS_IMPORTS
Defines boolean policy choice of loading the imports closure


IGNORE_IMPORT

public static final com.hp.hpl.jena.rdf.model.Property IGNORE_IMPORT
Specifies the URI of an ontology that we do not want to import, even if processImports is true.


USE_DECLARED_NS_PREFIXES

public static final com.hp.hpl.jena.rdf.model.Property USE_DECLARED_NS_PREFIXES
The policy property for including the pre-declared namespace prefixes in a model.

Constructor Detail

OntPolicy

public OntPolicy()
Method Detail

createOntologySpec

public static com.hp.hpl.jena.rdf.model.Resource createOntologySpec(com.hp.hpl.jena.rdf.model.Model model)

getAltURL

public static String getAltURL(com.hp.hpl.jena.rdf.model.Resource ontologySpec,
                               edu.stanford.smi.protege.model.Project project)

getRelativePhysicalFileName

public static String getRelativePhysicalFileName(com.hp.hpl.jena.rdf.model.Resource ontologySpec)

getOntologySpec

public static com.hp.hpl.jena.rdf.model.Resource getOntologySpec(com.hp.hpl.jena.rdf.model.Model model,
                                                                 String publicURI)

getPrefix

public static String getPrefix(com.hp.hpl.jena.rdf.model.Resource ontologySpec)

getPublicURL

public static String getPublicURL(com.hp.hpl.jena.rdf.model.Resource ontologySpec)

getPossibleFilePath

public static File getPossibleFilePath(edu.stanford.smi.protege.model.Project project)

isEditable

public static boolean isEditable(com.hp.hpl.jena.rdf.model.Resource ontologySpec)

isRelativeFileURL

private static boolean isRelativeFileURL(String str)

listOntologySpecs

public static Iterator listOntologySpecs(com.hp.hpl.jena.rdf.model.Model model)

loadOntPolicy

public static com.hp.hpl.jena.rdf.model.Model loadOntPolicy(edu.stanford.smi.protege.model.Project project)

loadOntPolicy

public static com.hp.hpl.jena.rdf.model.Model loadOntPolicy(String path)

saveOntPolicyFile

public static void saveOntPolicyFile(com.hp.hpl.jena.rdf.model.Model model,
                                     edu.stanford.smi.protege.model.Project project)
                              throws Exception
Throws:
Exception

saveOntPolicyFile

public static void saveOntPolicyFile(com.hp.hpl.jena.rdf.model.Model model,
                                     String path)
                              throws Exception
Throws:
Exception

setAltURL

public static boolean setAltURL(com.hp.hpl.jena.rdf.model.Resource ontologySpec,
                                String uri)

setEditable

public static void setEditable(com.hp.hpl.jena.rdf.model.Resource ontologySpec,
                               boolean value)

setPrefix

public static void setPrefix(com.hp.hpl.jena.rdf.model.Resource ontologySpec,
                             String prefix)