|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.interactive_instruments.ShapeChange.Target.Ontology.OntologyDocumentRDFXML
public class OntologyDocumentRDFXML
Field Summary | |
---|---|
protected String |
backPath
|
protected List<ClassInfo> |
classInfos
|
protected TargetOwlConfiguration |
config
|
protected Map<String,String> |
declaredRdfNamespacesByNsabr
Contains information on namespaces that should be declared in the ontology root element key: nsabr; value: rdf namespace |
protected Document |
document
|
protected String |
fileName
|
protected boolean |
finalized
|
protected Set<String> |
globalPropertyNames
|
protected Map<String,String> |
globalPropertyRangeValueByPropertyName
key: PropertyInfo.name(); value: 19150-2owl:propertyName (rdfNamespace + propertyLocalName) |
protected Comment |
hook
|
protected Set<String> |
imports
Contains locations for relevant ontologies that need to be imported |
protected Model |
model
|
protected PackageInfo |
mpackage
|
protected String |
name
|
protected Element |
ontology
|
protected Options |
options
|
protected OWLISO19150 |
owliso19150
|
protected String |
path
|
protected String |
prefix
|
protected boolean |
printed
|
protected String |
rdfNamespace
|
ShapeChangeResult |
result
|
protected Element |
root
|
protected String |
targetNamespace
|
protected Map<String,String> |
usedRdfNamespacesByNsabr
Contains information on namespaces that are used internally key: nsabr; value: rdf namespace |
Constructor Summary | |
---|---|
OntologyDocumentRDFXML(PackageInfo pi,
Model m,
Options o,
ShapeChangeResult r,
String xmlprefix,
OWLISO19150 owliso19150)
|
Method Summary | |
---|---|
protected void |
addAttribute(Element e,
String name,
String value)
Add attribute to an element |
void |
addClass(ClassInfo ci)
|
void |
addClassDefinition(ClassInfo ci)
|
void |
addCodelist(ClassInfo ci)
|
void |
addDatatype(ClassInfo ci)
|
void |
addEnumeration(ClassInfo ci)
|
void |
addFeature(ClassInfo ci)
|
protected void |
addImport(String rdfns)
|
protected void |
addImport(String rdfns,
String loc)
Logs an import statement for the given namespace, if it is not the same as the one of this ontology document (or its code namespace), and if the location is not null. |
protected void |
addImport(String prefix,
String rdfns,
String loc)
Logs an import statement for the given namespace, if it is not the same as the one of this ontology document (or its code namespace), and if the location is not null. |
void |
addInterface(ClassInfo ci)
|
protected void |
addMultiplicity(Element classE,
PropertyInfo pi)
|
void |
addUnion(ClassInfo ci)
|
static String |
computeBackPath(PackageInfo pi)
|
String |
computeName()
Determines the ontology name of a given package. |
static String |
computePath(PackageInfo pi)
Provides the path (of packages) that leads from the main schema package down to this package. |
static String |
computeRelativeLocation(OntologyDocument from,
OntologyDocument to)
Computes the relative path/location from a given ontology document to another ontology document. |
void |
createDocument()
|
void |
finalizeDocument()
|
String |
getBackPath()
|
String |
getCodeNamespace()
|
Document |
getDocument()
|
String |
getFileName()
|
String |
getName()
|
PackageInfo |
getPackage()
|
String |
getPath()
|
String |
getPrefix()
|
String |
getPrefixForCode()
|
String |
getRdfNamespace()
|
com.hp.hpl.jena.rdf.model.Resource |
getResource(ClassInfo ci)
|
protected String |
mapElement(ClassInfo ci)
|
protected String |
mapElement(Type ti)
|
String |
message(int mnr)
This method returns messages belonging to the XML Schema target by their message number. |
protected String |
messageText(int mnr)
This is the message text provision proper. |
static String |
normalizedName(ClassInfo ci)
|
static String |
normalizedName(PackageInfo pi)
Normalizes the name of a package according to the rules in ISO 19150-2owl:ontologyName. |
static String |
normalizedName(PropertyInfo pi)
|
void |
print(String outputDirectory,
ShapeChangeResult r)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Document document
protected Element root
protected Element ontology
protected Comment hook
protected Options options
public ShapeChangeResult result
protected Model model
protected PackageInfo mpackage
protected Set<String> imports
protected Map<String,String> declaredRdfNamespacesByNsabr
key: nsabr; value: rdf namespace
protected Map<String,String> usedRdfNamespacesByNsabr
key: nsabr; value: rdf namespace
protected Map<String,String> globalPropertyRangeValueByPropertyName
protected boolean printed
protected String targetNamespace
protected String name
protected String fileName
protected String rdfNamespace
protected String prefix
protected OWLISO19150 owliso19150
protected boolean finalized
protected String path
protected String backPath
protected List<ClassInfo> classInfos
protected TargetOwlConfiguration config
protected Set<String> globalPropertyNames
Constructor Detail |
---|
public OntologyDocumentRDFXML(PackageInfo pi, Model m, Options o, ShapeChangeResult r, String xmlprefix, OWLISO19150 owliso19150) throws ShapeChangeAbortException
ShapeChangeAbortException
Method Detail |
---|
public String computeName()
OWLISO19150.PARAM_ONTOLOGYNAME_TAGGED_VALUE_NAME
is set and an
according tagged value is set for the package its value is used.OWLISO19150.PARAM_URIBASE
is
set its value is used for constructing the ontologyNameOWLISO19150.RULE_OWL_PKG_PATH_IN_ONTOLOGY_NAME
is in effect, then
the umlPackageName is constructed using the path of the package to the
upmost owner that is in the same targetNamespace - using a combination of
"/" and normalized package names for all parent packages in the same
target namespace; otherwise just the normalized package name is appended
to URIbase as per 19150-2owl:ontologyName.
pi
-
public static String normalizedName(ClassInfo ci)
public static String computePath(PackageInfo pi)
pi
-
normalizedName(PackageInfo)
public static String computeBackPath(PackageInfo pi)
public static String normalizedName(PackageInfo pi)
pi
-
public void createDocument() throws ParserConfigurationException
ParserConfigurationException
protected void addImport(String rdfns, String loc)
Note: the information will be added to the document when
finalizeDocument()
is called.
rdfns
- loc
- protected void addImport(String prefix, String rdfns, String loc)
Also adds the namespace declaration.
Note: the information will be added to the document when
finalizeDocument()
is called.
rdfns
- loc
- protected void addAttribute(Element e, String name, String value)
public String message(int mnr)
This method returns messages belonging to the XML Schema target by their message number. The organization corresponds to the logic in module ShapeChangeResult. All functions in that class, which require an message number can be redirected to the function at hand.
message
in interface MessageSource
mnr
- Message number
protected String messageText(int mnr)
mnr
- Message number
public void finalizeDocument()
finalizeDocument
in interface OntologyDocument
public String getName()
getName
in interface OntologyDocument
public String getRdfNamespace()
getRdfNamespace
in interface OntologyDocument
public String getCodeNamespace()
getCodeNamespace
in interface OntologyDocument
public void addFeature(ClassInfo ci)
public void addClassDefinition(ClassInfo ci)
protected void addImport(String rdfns)
protected void addMultiplicity(Element classE, PropertyInfo pi)
protected String mapElement(Type ti)
public static String normalizedName(PropertyInfo pi)
protected String mapElement(ClassInfo ci)
public static String computeRelativeLocation(OntologyDocument from, OntologyDocument to)
from
- to
-
public String getFileName()
getFileName
in interface OntologyDocument
public void addInterface(ClassInfo ci)
public void addDatatype(ClassInfo ci)
public void addUnion(ClassInfo ci)
public void addCodelist(ClassInfo ci)
public void addEnumeration(ClassInfo ci)
public String getPrefix()
getPrefix
in interface OntologyDocument
public String getPrefixForCode()
getPrefixForCode
in interface OntologyDocument
public String getPath()
getPath
in interface OntologyDocument
public String getBackPath()
getBackPath
in interface OntologyDocument
public PackageInfo getPackage()
public Document getDocument()
public void addClass(ClassInfo ci)
addClass
in interface OntologyDocument
public void print(String outputDirectory, ShapeChangeResult r)
print
in interface OntologyDocument
public com.hp.hpl.jena.rdf.model.Resource getResource(ClassInfo ci)
getResource
in interface OntologyDocument
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |