Top Description Inners Constructors Methods
com.sun.tools.xjc.reader.xmlschema.parser

public Class XMLSchemaInternalizationLogic

extends Object
implements InternalizationLogic
Class Inheritance
All Implemented Interfaces
com.sun.tools.xjc.reader.internalizer.InternalizationLogic
Imports
com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl, .DOMForest, .InternalizationLogic, com.sun.tools.xjc.util.DOMUtils, org.w3c.dom.Element, .NodeList, org.xml.sax.Attributes, org.xml.sax.helpers.XMLFilterImpl, javax.xml.XMLConstants

XML Schema specific internalization logic.
Author
Kohsuke Kawaguchi ([email protected])

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
XMLSchemaInternalizationLogic.ReferenceFinder

This filter looks for <xs:import> and <xs:include> and parses those documents referenced by them.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
checkIfValidTargetNode(DOMForest parent, Element bindings, Element target)

Implements com.sun.tools.xjc.reader.internalizer.InternalizationLogic.checkIfValidTargetNode.

Checks if the specified element is a valid target node to attach a customization.

public XMLFilterImpl
createExternalReferenceFinder(DOMForest parent)

Implements com.sun.tools.xjc.reader.internalizer.InternalizationLogic.createExternalReferenceFinder.

Creates a new instance of XMLFilter that can be used to find references to external schemas.

private Element

Returns:

Newly create element.
insertXMLSchemaElement
(Element parent, String localName)

Creates a new XML Schema element of the given local name and insert it as the first child of the given parent node.

public Element
refineTarget(Element target)

Implements com.sun.tools.xjc.reader.internalizer.InternalizationLogic.refineTarget.

Prepares an element that actually receives customizations.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

XMLSchemaInternalizationLogicback to summary
public XMLSchemaInternalizationLogic()

Method Detail

checkIfValidTargetNodeback to summary
public boolean checkIfValidTargetNode(DOMForest parent, Element bindings, Element target)

Implements com.sun.tools.xjc.reader.internalizer.InternalizationLogic.checkIfValidTargetNode.

Doc from com.sun.tools.xjc.reader.internalizer.InternalizationLogic.checkIfValidTargetNode.

Checks if the specified element is a valid target node to attach a customization.

Annotations
@Override
createExternalReferenceFinderback to summary
public XMLFilterImpl createExternalReferenceFinder(DOMForest parent)

Implements com.sun.tools.xjc.reader.internalizer.InternalizationLogic.createExternalReferenceFinder.

Doc from com.sun.tools.xjc.reader.internalizer.InternalizationLogic.createExternalReferenceFinder.

Creates a new instance of XMLFilter that can be used to find references to external schemas.

Schemas that are included/imported need to be a part of DOMForest, and this filter will be expected to find such references.

Once such a reference is found, the filter is expected to call the parse method of DOMForest.

DOMForest will register ErrorHandler to the returned object, so any error should be sent to that error handler.

Annotations
@Override
insertXMLSchemaElementback to summary
private Element insertXMLSchemaElement(Element parent, String localName)

Creates a new XML Schema element of the given local name and insert it as the first child of the given parent node.

Returns:Element

Newly create element.

refineTargetback to summary
public Element refineTarget(Element target)

Implements com.sun.tools.xjc.reader.internalizer.InternalizationLogic.refineTarget.

Doc from com.sun.tools.xjc.reader.internalizer.InternalizationLogic.refineTarget.

Prepares an element that actually receives customizations.

For example, in XML Schema, target nodes can be any schema element but it is always the <xsd:appinfo> element that receives customization.

Annotations
@Override
com.sun.tools.xjc.reader.xmlschema.parser back to summary

private final Class XMLSchemaInternalizationLogic.ReferenceFinder

extends AbstractReferenceFinderImpl
Class Inheritance

This filter looks for <xs:import> and <xs:include> and parses those documents referenced by them.

Field Summary

Inherited from com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl:
parent

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected String
findExternalResource(String nsURI, String localName, Attributes atts)

Implements abstract com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.findExternalResource.

IF the given element contains a reference to an external resource, return its URL.

Inherited from com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl:
setDocumentLocatorstartElement

Constructor Detail

ReferenceFinderback to summary
pack-priv ReferenceFinder(DOMForest parent)

Method Detail

findExternalResourceback to summary
protected String findExternalResource(String nsURI, String localName, Attributes atts)

Implements abstract com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.findExternalResource.

Doc from com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.findExternalResource.

IF the given element contains a reference to an external resource, return its URL.

Annotations
@Override