|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protegex.owl.jena.DefaultURIResolver
The default implementation of URIResolver, using the project's OntPolicy file.
Field Summary | |
private edu.stanford.smi.protege.model.Project |
project
|
Constructor Summary | |
DefaultURIResolver(edu.stanford.smi.protege.model.Project project)
|
Method Summary | |
private String |
getApplicationDirectory()
|
protected URL |
getLocalProtegeURL()
|
protected URL |
getLocalSWRLBURL()
|
protected URL |
getLocalSWRLURL()
|
URL |
getPhysicalURL(URI uri)
Converts a logical URI into a physical URL. |
String |
getPreferredNamespacePrefix(String namespace)
Gets the prefix that should be used for a namespace if no other prefix has been defined yet. |
String |
getRelativePhysicalFileName(URI uri)
If the result of getPhysicalURL() is internally derived from a
relative file, then this returns the relative file name. |
boolean |
isEditableImport(URI uri)
Checks if a given import is editable for the current OWLModel. |
protected boolean |
isIgnoredImport(String uri)
|
private void |
save()
|
void |
setEditableImport(URI uri,
boolean value)
|
void |
setPhysicalURL(URI uri,
String relativeFileName)
Sets the physical URL of an URI to point to a relative file. |
void |
setPhysicalURL(URI uri,
URL physicalURL)
Sets the physical URL of an URI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private edu.stanford.smi.protege.model.Project project
Constructor Detail |
public DefaultURIResolver(edu.stanford.smi.protege.model.Project project)
Method Detail |
private String getApplicationDirectory()
public URL getPhysicalURL(URI uri)
URIResolver
getPhysicalURL
in interface URIResolver
uri
- the logical URI
public String getRelativePhysicalFileName(URI uri)
URIResolver
getPhysicalURL()
is internally derived from a
relative file, then this returns the relative file name.
getRelativePhysicalFileName
in interface URIResolver
uri
- the logical URI
public String getPreferredNamespacePrefix(String namespace)
URIResolver
getPreferredNamespacePrefix
in interface URIResolver
namespace
- the namespace to get a prefix for (including '#')
public boolean isEditableImport(URI uri)
URIResolver
isEditableImport
in interface URIResolver
uri
- the URI of the import (usually the name of the associated TripleStore)
protected URL getLocalProtegeURL() throws MalformedURLException
MalformedURLException
protected URL getLocalSWRLURL() throws MalformedURLException
MalformedURLException
protected URL getLocalSWRLBURL() throws MalformedURLException
MalformedURLException
protected boolean isIgnoredImport(String uri)
public void setEditableImport(URI uri, boolean value)
setEditableImport
in interface URIResolver
public void setPhysicalURL(URI uri, URL physicalURL)
URIResolver
setPhysicalURL
in interface URIResolver
uri
- the URI to set the URL ofphysicalURL
- the new physcial URL or null to reset this URIpublic void setPhysicalURL(URI uri, String relativeFileName)
URIResolver
setPhysicalURL
in interface URIResolver
uri
- the URI to set the URL ofrelativeFileName
- the name of the file (not null)private void save()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |