Package edu.ucsb.nceas.metacat.service
Class XMLSchema
java.lang.Object
edu.ucsb.nceas.metacat.service.XMLSchema
- Direct Known Subclasses:
XMLNoNamespaceSchema
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the external file uriGets the file nameGets the file namespaceGet the format idGets the local file directory pathGets the local file uristatic String
getType()
Return the type of the schema.void
setExternalFileUri
(String externalFileUri) Sets the external file uri.void
setFileName
(String fileName) Set the file name.void
setFileNamespace
(String fileNamespace) Sets the file namespacevoid
setFormatId
(String formatId) Set the format id.
-
Constructor Details
-
XMLSchema
Constructor - the schema file name will be extracted from the external file uri. The local file uri and local file dir will be constructed using system values and the file name.- Parameters:
fileNamespace
- the file's name spaceexternalFileUri
- the external uri where the schema is located
-
-
Method Details
-
setFileName
Set the file name. The local file uri and local file dir will also get set using system context url and dir values and the schema directory value.- Parameters:
fileName
- the file name to set
-
getFileName
Gets the file name- Returns:
- string holding the file name
-
setFileNamespace
Sets the file namespace- Parameters:
fileNamespace
- the namespace to set
-
getFileNamespace
Gets the file namespace- Returns:
- a string holding the file namespace
-
setExternalFileUri
Sets the external file uri. Extracts the file name from the uri and sets the file name as well.- Parameters:
externalFileUri
- the external file uri to set
-
getExternalFileUri
Gets the external file uri- Returns:
- a string holding the external file uri
-
getLocalFileUri
Gets the local file uri- Returns:
- a string holding the local file uri
-
getLocalFileDir
Gets the local file directory path- Returns:
- a string holding the local file directory path
-
getFormatId
Get the format id- Returns:
- the format id
-
setFormatId
Set the format id.- Parameters:
formatId
- .
-
getType
Return the type of the schema. It always is "Schema"- Returns:
-