1 /* $Id: SchemaLocation.java 1 2010-02-24 13:03:05Z haidw $ */
5 * Class to get the location of schemas.
7 public class SchemaLocation {
9 protected static final String PN_NAMESPACE =
10 "http://www.tik.ee.ethz.ch/~shapes/schema/PROCESSNETWORK";
11 protected static final String PN_LOCATION =
12 "http://www.tik.ee.ethz.ch/~shapes/schema/processnetwork.xsd";
13 protected static final String ARCH_NAMESPACE =
14 "http://www.tik.ee.ethz.ch/~shapes/schema/ARCHITECTURE";
15 protected static final String ARCH_LOCATION =
16 "http://www.tik.ee.ethz.ch/~shapes/schema/architecture.xsd";
17 protected static final String ARCH_NAMESPACE_OLD =
18 "http://www.tik.ee.ethz.ch/~shapes/schema/ARCHITECTURE_OLD";
19 protected static final String MAP_NAMESPACE =
20 "http://www.tik.ee.ethz.ch/~shapes/schema/MAPPING";
21 protected static final String MAP_LOCATION =
22 "http://www.tik.ee.ethz.ch/~shapes/schema/mapping.xsd";
23 protected static final String MAP_NAMESPACE_OLD =
24 "http://www.tik.ee.ethz.ch/~shapes/schema/MAPPING_OLD";
26 /** singleton instance */
27 protected final static SchemaLocation _schemaLocation =
31 * Default constructor.
33 public SchemaLocation() {
37 * Return the process network namespace.
39 * @return process network namespace
41 public static String getProcessNetworkNamespace() {
46 * Return the process network schema location.
48 * @return process network schema location
50 public static String getProcessNetworkSchemaLocation() {
55 * Return the architecture namespace.
57 * @return architecture namespace
59 public static String getArchitectureNamespace() {
60 return ARCH_NAMESPACE;
64 * Return the architecture schema location.
66 * @return architecture schema location
68 public static String getArchitectureSchemaLocation() {
73 * Return the mapping namespace.
75 * @return mapping namespace
77 public static String getMappingNamespace() {
82 * Return the mapping schema location.
84 * @return mapping schema location
86 public static String getMappingSchemaLocation() {
91 * Return a string with the references to the external schema files.
93 * @return references to external schemas
95 public static String getExternalSchemaLocation() {
96 String loc = PN_NAMESPACE + " ";
97 loc += _schemaLocation.getClass().getResource(
98 "/schema/processnetwork.xsd");
99 loc += " " + ARCH_NAMESPACE + " ";
100 loc += _schemaLocation.getClass().getResource(
101 "/schema/architecture.xsd");
102 loc += " " + ARCH_NAMESPACE_OLD + " ";
103 loc += _schemaLocation.getClass().getResource(
104 "/schema/architecture_old.xsd");
105 loc += " " + MAP_NAMESPACE + " ";
106 loc += _schemaLocation.getClass().getResource(
107 "/schema/mapping.xsd");
112 * Return a string with the references to the internal schema files.
114 * @return references to internal schemas
116 public static String getInternalSchemaLocation() {
117 String loc = PN_NAMESPACE + " ";
118 loc += _schemaLocation.getClass().getResource(
119 "/schema/internal/processnetwork_internal.xsd");
120 loc += " " + ARCH_NAMESPACE + " ";
121 loc += _schemaLocation.getClass().getResource(
122 "/schema/internal/architecture_internal.xsd");
123 loc += " " + ARCH_NAMESPACE_OLD + " ";
124 loc += _schemaLocation.getClass().getResource(
125 "/schema/internal/architecture_old_internal.xsd");
126 loc += " " + MAP_NAMESPACE + " ";
127 loc += _schemaLocation.getClass().getResource(
128 "/schema/internal/mapping_internal.xsd");
129 loc += " " + MAP_NAMESPACE_OLD + " ";
130 loc += _schemaLocation.getClass().getResource(
131 "/schema/internal/mapping_old_internal.xsd");