Package org.apache.xmlbeans.impl.schema
Class StscState
java.lang.Object
org.apache.xmlbeans.impl.schema.StscState
public class StscState extends Object
This class represents the state of the SchemaTypeSystemCompiler as it's
going.
-
Method Summary
Modifier and Type Method Description static voidaddError(Collection<XmlError> errorListener, String message, int code, XmlObject location)static voidaddError(Collection<XmlError> errorListener, String code, Object[] args, File location)static voidaddError(Collection<XmlError> errorListener, String code, Object[] args, URL location)static voidaddError(Collection<XmlError> errorListener, String code, Object[] args, XmlObject location)static voidaddInfo(Collection<XmlError> errorListener, String message)static voidaddInfo(Collection<XmlError> errorListener, String code, Object[] args)voidaddSchemaDigest(byte[] digest)Accumulates a schema digest...voidaddSourceUri(String uri, String nameToUse)Notes another URI that has been consumed during compilation (this is the URI that is in the document .NAME property)static voidaddWarning(Collection<XmlError> errorListener, String message, int code, XmlObject location)static voidaddWarning(Collection<XmlError> errorListener, String code, Object[] args, XmlObject location)booleanallowPartial()True if a partial SchemaTypeSystem should be producedstatic voidclearThreadLocals()StringcomputeSavedFilename(String uri)static voidend()voiderror(String message, int code, XmlObject loc)Passes an error on to the current error listener.voiderror(String code, Object[] args, XmlObject loc)Passes an error on to the current error listener.static StscStateget()BindingConfiggetBindingConfig()EntityResolvergetEntityResolver()May return null if there is no custom entity resolver.Collection<XmlError>getErrorListener()Returns the error listener being filled in during this compilationStringgetJavaname(QName qname, int kind)Looks up configured java name for the given qname.StringgetJavaPrefix(String namespace)Looks up package override for a namespace URIStringgetJavaSuffix(String namespace)Looks up package override for a namespace URIStringgetPackageOverride(String namespace)Looks up package override for a namespace URIintgetRecovered()Get count of recovered errors.SchemaTypeLoadergetS4SLoader()Returns the schema type loader to use for processing s4sFilegetSchemasDir()voidinfo(String message)Passes a warning on to the current error listener.voidinfo(String code, Object[] args)Passes a warning on to the current error listener.voidinitFromTypeSystem(SchemaTypeSystemImpl system, Set<String> newNamespaces)Initializer for incremental compilationbooleannoAnn()True if annotations should be skippedbooleannoPvr()True if no particle valid (restriction) option is setvoidnotFoundError(QName itemName, int code, XmlObject loc, boolean recovered)booleannoUpa()True if no unique particle attribution option is setvoidrecover(String code, Object[] args, XmlObject loc)Passes a recovered error on to the current error listener.Stringrelativize(String uri)voidsetBaseUri(URI uri)The base URI to use for nice filenames when saving sources.voidsetBindingConfig(BindingConfig config)Initializer for the schema config object.voidsetErrorListener(Collection<XmlError> errorListener)Initializer for error handling.voidsetGivenTypeSystemName(String name)voidsetImportingTypeLoader(SchemaTypeLoader loader)Initializer for schematypepathvoidsetOptions(XmlOptions options)Initializer for compatMap.voidsetSchemasDir(File _schemasDir)voidsetTargetSchemaTypeSystem(SchemaTypeSystemImpl target)Initializer for references to the SchemaTypeLoaderbooleanshouldDownloadURI(String uriString)True if the given URI is a local fileMap<String,String>sourceCopyMap()Returns the whole sourceCopyMap, mapping URI's that have been read to "sourceName" local names that have been used to tag the types.StringsourceNameForUri(String uri)Produces the "sourceName" (to be used within the schema project source file copies) from the URI of the original source.static StscStatestart()SchemaTypeSystemImplsts()The SchemaTypeSystem which we're building types on behalf of.voidwarning(String message, int code, XmlObject loc)Passes an error on to the current error listener.voidwarning(String code, Object[] args, XmlObject loc)Passes an error on to the current error listener.
-
Method Details
-
initFromTypeSystem
Initializer for incremental compilation -
setImportingTypeLoader
Initializer for schematypepath -
setErrorListener
Initializer for error handling. -
error
Passes an error on to the current error listener. KHK: remove this -
error
Passes an error on to the current error listener. -
recover
Passes a recovered error on to the current error listener. -
warning
Passes an error on to the current error listener. -
warning
Passes an error on to the current error listener. -
info
Passes a warning on to the current error listener. -
info
Passes a warning on to the current error listener. -
addError
public static void addError(Collection<XmlError> errorListener, String message, int code, XmlObject location) -
addError
public static void addError(Collection<XmlError> errorListener, String code, Object[] args, XmlObject location) -
addError
public static void addError(Collection<XmlError> errorListener, String code, Object[] args, File location) -
addError
public static void addError(Collection<XmlError> errorListener, String code, Object[] args, URL location) -
addWarning
public static void addWarning(Collection<XmlError> errorListener, String message, int code, XmlObject location) -
addWarning
public static void addWarning(Collection<XmlError> errorListener, String code, Object[] args, XmlObject location) -
addInfo
-
addInfo
-
setGivenTypeSystemName
-
setTargetSchemaTypeSystem
Initializer for references to the SchemaTypeLoader -
addSchemaDigest
public void addSchemaDigest(byte[] digest)Accumulates a schema digest... -
sts
The SchemaTypeSystem which we're building types on behalf of. -
shouldDownloadURI
True if the given URI is a local file -
setOptions
Initializer for compatMap. -
getEntityResolver
May return null if there is no custom entity resolver. -
noUpa
public boolean noUpa()True if no unique particle attribution option is set -
noPvr
public boolean noPvr()True if no particle valid (restriction) option is set -
noAnn
public boolean noAnn()True if annotations should be skipped -
allowPartial
public boolean allowPartial()True if a partial SchemaTypeSystem should be produced -
getRecovered
public int getRecovered()Get count of recovered errors. Not for public. -
setBindingConfig
Initializer for the schema config object.- Throws:
IllegalArgumentException
-
getBindingConfig
- Throws:
IllegalArgumentException
-
getPackageOverride
Looks up package override for a namespace URI -
getJavaPrefix
Looks up package override for a namespace URI -
getJavaSuffix
Looks up package override for a namespace URI -
getJavaname
Looks up configured java name for the given qname. -
clearThreadLocals
public static void clearThreadLocals() -
start
-
get
-
end
public static void end() -
notFoundError
-
sourceNameForUri
Produces the "sourceName" (to be used within the schema project source file copies) from the URI of the original source.Returns null if none.
-
sourceCopyMap
Returns the whole sourceCopyMap, mapping URI's that have been read to "sourceName" local names that have been used to tag the types. -
setBaseUri
The base URI to use for nice filenames when saving sources. -
relativize
-
computeSavedFilename
-
addSourceUri
Notes another URI that has been consumed during compilation (this is the URI that is in the document .NAME property) -
getErrorListener
Returns the error listener being filled in during this compilation -
getS4SLoader
Returns the schema type loader to use for processing s4s -
getSchemasDir
-
setSchemasDir
-