Top Description Methods
com.sun.tools.xjc.reader.internalizer

public Interface InternalizationLogic

Known Direct Implementers
com.sun.tools.xjc.reader.relaxng.RELAXNGInternalizationLogic, com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic
Imports
org.w3c.dom.Element, org.xml.sax.helpers.XMLFilterImpl

Encapsulates schema-language dependent internalization logic. Internalizer and DOMForest are responsible for doing schema language independent part, and this object is responsible for schema language dependent part.
Author
Kohsuke Kawaguchi ([email protected])

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if it's OK, false if not.
checkIfValidTargetNode
(DOMForest
The owner DOMForest object. Probably useful only to obtain context information, such as error handler.
parent
,
Element
<jaxb:bindings> element or a customization element.
bindings
,
Element target)

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

public XMLFilterImpl

Returns:

This method returns XMLFilterImpl because the filter has to be usable for two directions (wrapping a reader and wrapping a ContentHandler)
createExternalReferenceFinder
(DOMForest parent)

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

public Element

Returns:

Always return non-null valid object
refineTarget
(Element
The target node designated by the customization.
target
)

Prepares an element that actually receives customizations.

Method Detail

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

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

Parameters
parent:DOMForest

The owner DOMForest object. Probably useful only to obtain context information, such as error handler.

bindings:Element

<jaxb:bindings> element or a customization element.

Returns:boolean

true if it's OK, false if not.

createExternalReferenceFinderback to summary
public XMLFilterImpl createExternalReferenceFinder(DOMForest parent)

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.

Returns:XMLFilterImpl

This method returns XMLFilterImpl because the filter has to be usable for two directions (wrapping a reader and wrapping a ContentHandler)

refineTargetback to summary
public Element refineTarget(Element target)

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.

Parameters
target:Element

The target node designated by the customization.

Returns:Element

Always return non-null valid object