Class XMLSchemaValidatorProp
- All Implemented Interfaces:
EventListener
,IGProp<Map<String,
,String>> Cloneable
,LSResourceResolver
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Constructor Summary
ModifierConstructorDescriptionprotected
Creates an XML Schema validator property with no name and an empty set if schema sources.XMLSchemaValidatorProp
(Atom propertyAtom) Creates an XML Schema validator property with specified name and an empty set if schema sources.Method Summary
Modifier and TypeMethodDescriptionclone()
Clones the XMLSchemaValidatorProp.static DOMImplementationLS
Gets the DOM Level 3 load/save implementation.static String
getResourceSchema
(String namespaceURI) Gets the URL for a resource based namespace provided with IIZI, i.e.static SchemaFactory
Gets the schema factory.Gets or creates the Schema validator from the Schema sources.protected boolean
Called upon creation of the property to check it's private state.void
Resets the validator if new Schema sources have been added to the map using the StringMap functions.Allow the application to resolve external resources.void
setXMLSchemas
(Map<String, String> schemaSources, Validator validator) Assigns the map of the schema sources along with an existing validator.Methods inherited from class com.iizix.prop.StringMapProp
addSystemProperties, appendPropValue, clear, equalValues, getHashMap, getPropValue0, getStringMapAsStringArray, getValue, getValueClasses, initializeElement, initializeProp, initializeValue, modifyPropValue, put, removeKey, size, toNativeValue0, validatePropType
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalsTree, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPrepare, onPropDispose, onPropInvalidateCache, onPropParentChanged, onPropTreeInitialized, onPropValueSet, onReferenceEvent, onRemoteEvent, onVirtualizationCompleted, paramString, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setCreateRequiredProp, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toElementString, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropValue, verify, virtualize, warning, warning, warning
Constructor Details
XMLSchemaValidatorProp
protected XMLSchemaValidatorProp()Creates an XML Schema validator property with no name and an empty set if schema sources.XMLSchemaValidatorProp
Creates an XML Schema validator property with specified name and an empty set if schema sources.- Parameters:
propertyAtom
- the property atom.
Method Details
getResourceSchema
Gets the URL for a resource based namespace provided with IIZI, i.e. SOAP 1.1 and 1.2, WSDL 1.1 and XML security schemas.- Parameters:
namespaceURI
- The namespace URI, if null then null is returned.- Returns:
- The Schema contents, or null if not found.
isPropPrivateAtCreation
protected boolean isPropPrivateAtCreation()Called upon creation of the property to check it's private state. This is used by properties that are not distributed to the remote party.The XML Schema validation property is private and is not transported to a remote party.
- Overrides:
isPropPrivateAtCreation
in classGProp<Map<String,
String>> - Returns:
- true if the property should be set to private at creation, false for default.
clone
Clones the XMLSchemaValidatorProp.- Overrides:
clone
in classStringMapProp
getSchemaFactory
public static SchemaFactory getSchemaFactory() throws SAXNotRecognizedException, SAXNotSupportedExceptionGets the schema factory. The factory is initialized for secure processing. In case of an exception, the error is logged as a severe event.- Returns:
- The instance of the factory.
- Throws:
SAXNotSupportedException
SAXNotRecognizedException
getDom3LoadSave
public static DOMImplementationLS getDom3LoadSave() throws ClassNotFoundException, InstantiationException, IllegalAccessException, ClassCastExceptionGets the DOM Level 3 load/save implementation. In case of an exception, the error is logged as a severe event.- Returns:
- The implementation instance.
- Throws:
ClassNotFoundException
- If any specified class can not be found.InstantiationException
- If any specified class is an interface or abstract class.IllegalAccessException
- If the default constructor of a specified class is not accessible.ClassCastException
- If any specified class does not implementDOMImplementationSource
.
setXMLSchemas
public void setXMLSchemas(Map<String, String> schemaSources, Validator validator) throws PropTypeExceptionAssigns the map of the schema sources along with an existing validator.- Parameters:
schemaSources
- The map of namespaces as keys and their Schema sources as values.validator
- The Schema validator for the schemas.- Throws:
NullPointerException
- If the validator or the schemas sources are null.PropTypeException
- If the property is read-only.
getValidator
Gets or creates the Schema validator from the Schema sources.- Returns:
- The Schema validator.
- Throws:
SAXException
- If the validator could not be created.
resetValidator
public void resetValidator()Resets the validator if new Schema sources have been added to the map using the StringMap functions. This will cause theValidator
created in the callgetValidator()
to be created again from the new sources.resolveResource
public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) Allow the application to resolve external resources.The
LSParser
will call this method before opening any external resource, including the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element (however, the top-level document entity is not passed to this method). The application may then request that theLSParser
resolve the external resource itself, that it use an alternative URI, or that it use an entirely different input source.Application writers can use this method to redirect external system identifiers to secure and/or local URI, to look up public identifiers in a catalog, or to read an entity from a database or other input source (including, for example, a dialog box).
- Specified by:
resolveResource
in interfaceLSResourceResolver
- Parameters:
type
- The type of the resource being resolved. For XML resources (i.e. entities), applications must use the value"http://www.w3.org/TR/REC-xml"
. For XML Schema, applications must use the value"http://www.w3.org/2001/XMLSchema"
. Other types of resources are outside the scope of this specification and therefore should recommend an absolute URI in order to use this method.namespaceURI
- The namespace of the resource being resolved.publicId
- The public identifier of the external entity being referenced, ornull
for none.systemId
- The system identifier, a URI reference of the external resource being referenced, ornull
for none.baseURI
- The absolute base URI of the resource being parsed, ornull
if there is no base URI.- Returns:
- A
LSInput
object describing the new input source, ornull
to request that the parser open a regular URI connection to the resource.