public class XMLSchemaService extends BaseService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACEKEYWORD |
static java.lang.String |
SCHEMA_DIR |
_serviceName
Modifier and Type | Method and Description |
---|---|
static boolean |
areAllSchemasRegistered(java.util.Vector<XMLSchema> schemaList)
Checks to see that all schemas are registered.
|
void |
doRefresh()
refresh the persistant values in this service.
|
static java.lang.String |
findDocumentNamespace(java.io.StringReader xml)
Returns all the namespace for an xml document.
|
static java.util.Vector<XMLSchema> |
findSchemasInXML(java.io.StringReader xml)
See if schemas have been specified in the xml:schemalocation attribute.
|
static java.lang.String |
getBaseUrlFromSchemaURL(java.lang.String url)
Get a base url from the schema url.
|
static XMLSchemaService |
getInstance()
Get the single instance of XMLService.
|
java.lang.String |
getNameSpaceAndLocation(java.lang.String formatId)
Get the all schema-location pairs registered for the formatId.
|
java.lang.String |
getNameSpaceAndLocationStringWithoutFormatId()
Gets the name space and location string.
|
java.util.Vector<java.lang.String> |
getNameSpaceList()
Gets a list of name spaces.
|
java.util.Vector<XMLSchema> |
getRegisteredSchemaList()
Gets the registered schema list.
|
static java.lang.String |
getSchemaFileNameFromUri(java.lang.String uri)
Get a schema file name from the schema uri.
|
static boolean |
isSchemaRegistered(XMLSchema xmlSchema)
Returns true if the schema is registered.
|
void |
populateRegisteredSchemaList()
Populate the list of registered schemas.
|
boolean |
refreshable() |
void |
stop() |
boolean |
useFullSchemaValidation()
Report whether xml parsing is set to use full schema parsing.
|
refresh
public static final java.lang.String NAMESPACEKEYWORD
public static final java.lang.String SCHEMA_DIR
public static XMLSchemaService getInstance()
public boolean refreshable()
refreshable
in class BaseService
public void doRefresh() throws ServiceException
doRefresh
in class BaseService
ServiceException
public void stop() throws ServiceException
stop
in class BaseService
ServiceException
public java.util.Vector<XMLSchema> getRegisteredSchemaList()
public java.lang.String getNameSpaceAndLocationStringWithoutFormatId()
public java.lang.String getNameSpaceAndLocation(java.lang.String formatId)
formatId
- public java.util.Vector<java.lang.String> getNameSpaceList()
public boolean useFullSchemaValidation()
public void populateRegisteredSchemaList()
public static boolean areAllSchemasRegistered(java.util.Vector<XMLSchema> schemaList)
schemaList
- a list of schemas as they appear in xml.public static boolean isSchemaRegistered(XMLSchema xmlSchema)
schema
- a single schema as it appears in xmlpublic static java.util.Vector<XMLSchema> findSchemasInXML(java.io.StringReader xml) throws java.io.IOException
xml
- the document we want to look in for schema locationjava.io.IOException
public static java.lang.String findDocumentNamespace(java.io.StringReader xml) throws java.io.IOException
xml
- the document to searchjava.io.IOException
public static java.lang.String getSchemaFileNameFromUri(java.lang.String uri)
uri
- the uri from which to extract the file namepublic static java.lang.String getBaseUrlFromSchemaURL(java.lang.String url)
uri
- the uri from which to extract the base urlCopyright © 2016 Regents of the University of California. All Rights Reserved.