Top Inners Fields Constructors Methods
com.sun.tools.rngom.binary

public Class SchemaBuilderImpl

extends Object
implements SchemaBuilder, ElementAnnotationBuilder, CommentList
Class Inheritance
All Implemented Interfaces
com.sun.tools.rngom.ast.builder.CommentList, com.sun.tools.rngom.ast.builder.ElementAnnotationBuilder, com.sun.tools.rngom.ast.builder.Annotations, com.sun.tools.rngom.ast.builder.SchemaBuilder
Imports
java.util.Enumeration, .Hashtable, .List, com.sun.tools.rngom.ast.builder.Annotations, .BuildException, .CommentList, .DataPatternBuilder, .Div, .ElementAnnotationBuilder, .Grammar, .GrammarSection, .Include, .IncludedGrammar, .NameClassBuilder, .SchemaBuilder, .Scope, com.sun.tools.rngom.ast.om.Location, .ParsedElementAnnotation, .ParsedNameClass, .ParsedPattern, com.sun.tools.rngom.ast.util.LocatorImpl, com.sun.tools.rngom.dt.builtin.BuiltinDatatypeLibraryFactory, com.sun.tools.rngom.dt.CascadingDatatypeLibraryFactory, com.sun.tools.rngom.nc.NameClass, .NameClassBuilderImpl, com.sun.tools.rngom.parse.Context, .IllegalSchemaException, .Parseable, com.sun.tools.rngom.util.Localizer, com.sun.tools.rngdatatype.Datatype, .DatatypeBuilder, .DatatypeException, .DatatypeLibrary, .DatatypeLibraryFactory, .ValidationContext, com.sun.tools.rngdatatype.helpers.DatatypeLibraryLoader, org.xml.sax.ErrorHandler, .Locator, .SAXException, .SAXParseException

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
pack-priv static class
private static class
pack-priv static class
pack-priv static class
private static class

Field Summary

Modifier and TypeField and Description
private final DatatypeLibraryFactory
private final ErrorHandler
private boolean
private final String
pack-priv static final Localizer
private final NameClassBuilder<N extends ParsedNameClass, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
private final SchemaBuilderImpl.OpenIncludes
private final SchemaBuilderImpl
private final SchemaPatternBuilder

Constructor Summary

AccessConstructor and Description
public
SchemaBuilderImpl(ErrorHandler
Error handler to receive errors while building the schema.
eh
)

public
SchemaBuilderImpl(ErrorHandler
Error handler to receive errors while building the schema.
eh
,
DatatypeLibraryFactory
This is consulted to locate datatype libraries.
datatypeLibraryFactory
,
SchemaPatternBuilder
Used to build patterns.
pb
)

private

Method Summary

Modifier and TypeMethod and Description
public void
addAttribute(String ns, String localName, String prefix, String value, Location loc)

Implements com.sun.tools.rngom.ast.builder.Annotations.addAttribute.

Called for an attribute annotation.

public void
public void
addComment(CommentList<L extends Location> comments)

Implements com.sun.tools.rngom.ast.builder.Annotations.addComment.

Adds comments following the last initial child element annotation.

public void
public void
public void
addText(String value, Location loc, CommentList<L extends Location> comments)

Implements com.sun.tools.rngom.ast.builder.ElementAnnotationBuilder.addText.

Called when a child text is found.

public ParsedPattern
annotate(ParsedPattern p, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.annotate.

Called when annotation is found right inside a pattern such as,

<element name="foo">     <!-- this becomes 'P' -->
  <foreign:annotation /> <!-- this becomes 'A' -->
  ...
public ParsedPattern
annotateAfter(ParsedPattern p, ParsedElementAnnotation e)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.annotateAfter.

Called when element annotation is found after a pattern.

public ParsedPattern
private void
private void
error(String key, Locator loc)

private void
error(String key, String arg, Locator loc)

private void
error(String key, String arg1, String arg2, Locator loc)

private void
error(String key, String arg1, String arg2, String arg3, Locator loc)

public ParsedPattern
expandPattern(ParsedPattern _pattern)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.expandPattern.

Called after all the parsing is done.

public NameClassBuilder<N extends ParsedNameClass, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
getNameClassBuilder()

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.getNameClassBuilder.

Returns the NameClassBuilder, which is used to build name classes for this .

public Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>>
makeAnnotations(CommentList<L extends Location> comments, Context context)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeAnnotations.

Creates Annotations object to parse annotations on patterns.

public ParsedPattern
public ParsedPattern
public CommentList<L extends Location>
public DataPatternBuilder<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
public ParsedPattern
public ParsedElementAnnotation
makeElementAnnotation()

Implements com.sun.tools.rngom.ast.builder.ElementAnnotationBuilder.makeElementAnnotation.

Called at the end to build an application data structure.

public ElementAnnotationBuilder<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
public ParsedPattern
public ParsedPattern
public ParsedPattern
makeExternalRef(Parseable current, String uri, String ns, Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> scope, Location loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeExternalRef.

public Grammar<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>>
makeGrammar(Scope<P extends ParsedPattern, E extends ParsedElementAnnotation, L extends Location, A extends Annotations<E, L, CL>, CL extends CommentList<L>> parent)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeGrammar.

public ParsedPattern
public ParsedPattern
public ParsedPattern
public Location
makeLocation(String systemId, int lineNumber, int columnNumber)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeLocation.

public ParsedPattern
public ParsedPattern
public ParsedPattern
public ParsedPattern
public ParsedPattern
public ParsedPattern
makeValue(String datatypeLibrary, String type, String value, Context context, String ns, Location loc, Annotations<E extends ParsedElementAnnotation, L extends Location, CL extends CommentList<L>> anno)

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.makeValue.

public ParsedPattern
private void
public boolean
usesComments()

Implements com.sun.tools.rngom.ast.builder.SchemaBuilder.usesComments.

If this is interested in actually parsing comments, this method returns true.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait