1
|
/**
|
2
|
* '$RCSfile$'
|
3
|
* Copyright: 2016 Regents of the University of California and the
|
4
|
* National Center for Ecological Analysis and Synthesis
|
5
|
* Authors: Jing Tao
|
6
|
* This program is free software; you can redistribute it and/or modify
|
7
|
* it under the terms of the GNU General Public License as published by
|
8
|
* the Free Software Foundation; either version 2 of the License, or
|
9
|
* (at your option) any later version.
|
10
|
*
|
11
|
* This program is distributed in the hope that it will be useful,
|
12
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
* GNU General Public License for more details.
|
15
|
*
|
16
|
* You should have received a copy of the GNU General Public License
|
17
|
* along with this program; if not, write to the Free Software
|
18
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
*/
|
20
|
package edu.ucsb.nceas.metacat.service;
|
21
|
|
22
|
import edu.ucsb.nceas.metacat.DocumentImpl;
|
23
|
|
24
|
|
25
|
/**
|
26
|
* This class represents the information for a schema without a namespace
|
27
|
* @author tao
|
28
|
*
|
29
|
*/
|
30
|
public class XMLNoNamespaceSchema extends XMLSchema {
|
31
|
private String noNamespaceSchemaLocation = null;
|
32
|
private static final String type = DocumentImpl.NONAMESPACESCHEMA;
|
33
|
|
34
|
/**
|
35
|
* Constructor of the object
|
36
|
* @param noNamespaceSchemaLocation the uri of the noNamespaceSchemaLocation of the schema
|
37
|
* @param externalFileUri the registered file url location for this schema
|
38
|
* @param formatId the format id of a xml instance of the schema
|
39
|
*/
|
40
|
public XMLNoNamespaceSchema(String noNamespaceSchemaLocation, String externalFileUri, String formatId) {
|
41
|
//since it doesn't have a namespace, the null value will be set for the namespace
|
42
|
super(null, externalFileUri, formatId);
|
43
|
this.noNamespaceSchemaLocation = noNamespaceSchemaLocation;
|
44
|
}
|
45
|
|
46
|
/**
|
47
|
* Get the no-namespace-schemal-location uri
|
48
|
* @return
|
49
|
*/
|
50
|
public String getNoNamespaceSchemaLocation() {
|
51
|
return noNamespaceSchemaLocation;
|
52
|
}
|
53
|
|
54
|
/**
|
55
|
* Set the no-namespace-schemal-location uri
|
56
|
* @param noNamespaceSchemaLocation
|
57
|
*/
|
58
|
public void setNoNamespaceSchemaLocation(String noNamespaceSchemaLocation) {
|
59
|
this.noNamespaceSchemaLocation = noNamespaceSchemaLocation;
|
60
|
}
|
61
|
|
62
|
/**
|
63
|
* Return the type of schema. It always is "NoNamespaceSchema".
|
64
|
* @return
|
65
|
*/
|
66
|
public static String getType() {
|
67
|
return type;
|
68
|
}
|
69
|
}
|