|
Protégé-OWL 3.4.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protegex.owl.writer.rdfxml.util.Util
public class Util
User: matthewhorridge
The Univeristy Of Manchester
Medical Informatics Group
Date: March 22, 2005
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static XMLWriterNamespaceManager |
getNamespacePrefixes(NamespaceManager nsm,
String defaultNamespace)
Gets the namespace prefixes for the combination of a NamespaceManager and XMLWriter . |
static String |
getOntologyName(OWLModel model,
TripleStore tripleStore)
|
static String |
getPrefixedName(String fullName,
TripleStore tripleStore)
|
static String |
getResourceAttributeName(RDFResource resource,
XMLWriter writer)
Gets the value for a resource attribute value such as rdf:about or rdf:resource. |
static RDFResource |
getType(RDFResource resource,
TripleStore ts)
|
static void |
inlineObject(Visitable object,
TripleStore tripleStore,
XMLWriter writer)
Inserts the object of a triple. |
static void |
insertAboutAttribute(RDFResource resource,
XMLWriter writer)
Inserts an rdf:about attribute for the specified resource. |
static void |
insertIDOrAboutAttribute(RDFResource resource,
TripleStore tripleStore,
XMLWriter writer)
Inserts an rdf:ID attribute for the specified resource. |
static void |
insertProperties(RDFResource resource,
TripleStore tripleStore,
XMLWriter writer,
boolean sort)
Inserts a property-value triple for a specified resource. |
static void |
insertResourceAsElement(RDFResource resource,
XMLWriter writer)
Creates a new element, with a tag name that reflects the default namespace of the XMLWriter |
static void |
insertResourceAttribute(RDFResource resource,
XMLWriter writer)
Inserts an rdf:resource attribute for the specified resource. |
static boolean |
isExcludedProperty(RDFProperty property)
|
static boolean |
isInDefaultNamespace(RDFResource resource,
XMLWriter writer)
Checks whether a resource is in the default namespace for an XMLWriter |
static void |
renderTypes(RDFResource resource,
TripleStore tripleStore,
RDFResource excludeType,
XMLWriter writer)
Renders the types for a resource as rdf:type triples. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static boolean isExcludedProperty(RDFProperty property)
public static void insertProperties(RDFResource resource, TripleStore tripleStore, XMLWriter writer, boolean sort) throws IOException
resource
- The resource that the property-value triple
is to be inserted for. It is expected that the resource element
IOException
public static void inlineObject(Visitable object, TripleStore tripleStore, XMLWriter writer) throws IOException
object
- The object of a triple to be inserted.writer
- The XMLWriter
IOException
public static void insertAboutAttribute(RDFResource resource, XMLWriter writer) throws IOException
resource
- The resourcewriter
- The rdfwriter
IOException
public static void insertIDOrAboutAttribute(RDFResource resource, TripleStore tripleStore, XMLWriter writer) throws IOException
resource
- The resourcewriter
- The rdfwriter
IOException
public static void insertResourceAttribute(RDFResource resource, XMLWriter writer) throws IOException
resource
- The resourcewriter
- The rdfwriter
IOException
public static String getResourceAttributeName(RDFResource resource, XMLWriter writer)
resource
- The resourcepublic static void insertResourceAsElement(RDFResource resource, XMLWriter writer) throws IOException
XMLWriter
resource
- The resource to be inserted as an element.writer
- The XML
rdfwriter that the element will be written to.
IOException
public static boolean isInDefaultNamespace(RDFResource resource, XMLWriter writer)
XMLWriter
resource
- The resource to be checked.writer
- The XMLWriter
that the resource's namespace should
be checked against.
true
if the resource is in the rdfwriter's default namespace
or false
if the resource is not in the rdfwriter's default namespace.public static XMLWriterNamespaceManager getNamespacePrefixes(NamespaceManager nsm, String defaultNamespace)
NamespaceManager
and XMLWriter
.
The default namespace for the rdfwriter may not be the same as the
default namespace in the namespace manager, so the result of
this method does not include the prefix for the default namespace
in the rdfwriter.
nsm
- The NamspaceManager
defaultNamespace
- The default namespace
Map
of String
pairs. The keyset
contains the prefixes.public static void renderTypes(RDFResource resource, TripleStore tripleStore, RDFResource excludeType, XMLWriter writer) throws IOException
resource
- The resource whose rdf:type triples are to
be rendered.tripleStore
- The triple store that the renderer should render with
respect to - only type triples that are asserted in this triple store will be
rendered.excludeType
- The one type that should not be rendered - this
method expects that this type will have been used in the RDF/XML optimisation
practice of putting one of the types as an element tag name.writer
- The XMLWriter
that the triples will be added to.
IOException
public static RDFResource getType(RDFResource resource, TripleStore ts)
public static String getOntologyName(OWLModel model, TripleStore tripleStore)
public static String getPrefixedName(String fullName, TripleStore tripleStore)
|
Protégé-OWL 3.4.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |