Class StscState


  • public class StscState
    extends java.lang.Object
    This class represents the state of the SchemaTypeSystemCompiler as it's going.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.Object CHAMELEON_INCLUDE_URI
      Used to store the new target namespace for a chameleon included schema.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void addError​(java.util.Collection errorListener, java.lang.String message, int code, XmlObject location)  
      static void addError​(java.util.Collection errorListener, java.lang.String code, java.lang.Object[] args, java.io.File location)  
      static void addError​(java.util.Collection errorListener, java.lang.String code, java.lang.Object[] args, java.net.URL location)  
      static void addError​(java.util.Collection errorListener, java.lang.String code, java.lang.Object[] args, XmlObject location)  
      static void addInfo​(java.util.Collection errorListener, java.lang.String message)  
      static void addInfo​(java.util.Collection errorListener, java.lang.String code, java.lang.Object[] args)  
      void addSchemaDigest​(byte[] digest)
      Accumulates a schema digest...
      void addSourceUri​(java.lang.String uri, java.lang.String nameToUse)
      Notes another URI that has been consumed during compilation (this is the URI that is in the document .NAME property)
      static void addWarning​(java.util.Collection errorListener, java.lang.String message, int code, XmlObject location)  
      static void addWarning​(java.util.Collection errorListener, java.lang.String code, java.lang.Object[] args, XmlObject location)  
      boolean allowPartial()
      True if a partial SchemaTypeSystem should be produced
      static void clearThreadLocals()  
      java.lang.String computeSavedFilename​(java.lang.String uri)  
      static void end()  
      void error​(java.lang.String message, int code, XmlObject loc)
      Passes an error on to the current error listener.
      void error​(java.lang.String code, java.lang.Object[] args, XmlObject loc)
      Passes an error on to the current error listener.
      static StscState get()  
      BindingConfig getBindingConfig()  
      org.xml.sax.EntityResolver getEntityResolver()
      May return null if there is no custom entity resolver.
      java.util.Collection getErrorListener()
      Returns the error listener being filled in during this compilation
      java.lang.String getJavaname​(javax.xml.namespace.QName qname, int kind)
      Looks up configured java name for the given qname.
      java.lang.String getJavaPrefix​(java.lang.String namespace)
      Looks up package override for a namespace URI
      java.lang.String getJavaSuffix​(java.lang.String namespace)
      Looks up package override for a namespace URI
      java.lang.String getPackageOverride​(java.lang.String namespace)
      Looks up package override for a namespace URI
      int getRecovered()
      Get count of recovered errors.
      SchemaTypeLoader getS4SLoader()
      Returns the schema type loader to use for processing s4s
      java.io.File getSchemasDir()  
      void info​(java.lang.String message)
      Passes a warning on to the current error listener.
      void info​(java.lang.String code, java.lang.Object[] args)
      Passes a warning on to the current error listener.
      void initFromTypeSystem​(SchemaTypeSystemImpl system, java.util.Set newNamespaces)
      Initializer for incremental compilation
      boolean noAnn()
      True if annotations should be skipped
      boolean noPvr()
      True if no particle valid (restriciton) option is set
      void notFoundError​(javax.xml.namespace.QName itemName, int code, XmlObject loc, boolean recovered)  
      boolean noUpa()
      True if no unique particle attribution option is set
      void recover​(java.lang.String code, java.lang.Object[] args, XmlObject loc)
      Passes a recovered error on to the current error listener.
      java.lang.String relativize​(java.lang.String uri)  
      void setBaseUri​(java.net.URI uri)
      The base URI to use for nice filenames when saving sources.
      void setBindingConfig​(BindingConfig config)
      Initializer for the schema config object.
      void setErrorListener​(java.util.Collection errorListener)
      Initializer for error handling.
      void setGivenTypeSystemName​(java.lang.String name)  
      void setImportingTypeLoader​(SchemaTypeLoader loader)
      Initializer for schematypepath
      void setOptions​(XmlOptions options)
      Initializer for compatMap.
      void setSchemasDir​(java.io.File _schemasDir)  
      void setTargetSchemaTypeSystem​(SchemaTypeSystemImpl target)
      Initializer for references to the SchemaTypeLoader
      boolean shouldDownloadURI​(java.lang.String uriString)
      True if the given URI is a local file
      java.util.Map sourceCopyMap()
      Returns the whole sourceCopyMap, mapping URI's that have been read to "sourceName" local names that have been used to tag the types.
      java.lang.String sourceNameForUri​(java.lang.String uri)
      Produces the "sourceName" (to be used within the schema project source file copies) from the URI of the original source.
      static StscState start()  
      SchemaTypeSystemImpl sts()
      The SchemaTypeSystem which we're building types on behalf of.
      void warning​(java.lang.String message, int code, XmlObject loc)
      Passes an error on to the current error listener.
      void warning​(java.lang.String code, java.lang.Object[] args, XmlObject loc)
      Passes an error on to the current error listener.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CHAMELEON_INCLUDE_URI

        public static final java.lang.Object CHAMELEON_INCLUDE_URI
        Used to store the new target namespace for a chameleon included schema.
    • Method Detail

      • initFromTypeSystem

        public void initFromTypeSystem​(SchemaTypeSystemImpl system,
                                       java.util.Set newNamespaces)
        Initializer for incremental compilation
      • setImportingTypeLoader

        public void setImportingTypeLoader​(SchemaTypeLoader loader)
        Initializer for schematypepath
      • setErrorListener

        public void setErrorListener​(java.util.Collection errorListener)
        Initializer for error handling.
      • error

        public void error​(java.lang.String message,
                          int code,
                          XmlObject loc)
        Passes an error on to the current error listener. KHK: remove this
      • error

        public void error​(java.lang.String code,
                          java.lang.Object[] args,
                          XmlObject loc)
        Passes an error on to the current error listener.
      • recover

        public void recover​(java.lang.String code,
                            java.lang.Object[] args,
                            XmlObject loc)
        Passes a recovered error on to the current error listener.
      • warning

        public void warning​(java.lang.String message,
                            int code,
                            XmlObject loc)
        Passes an error on to the current error listener.
      • warning

        public void warning​(java.lang.String code,
                            java.lang.Object[] args,
                            XmlObject loc)
        Passes an error on to the current error listener.
      • info

        public void info​(java.lang.String message)
        Passes a warning on to the current error listener.
      • info

        public void info​(java.lang.String code,
                         java.lang.Object[] args)
        Passes a warning on to the current error listener.
      • addError

        public static void addError​(java.util.Collection errorListener,
                                    java.lang.String message,
                                    int code,
                                    XmlObject location)
      • addError

        public static void addError​(java.util.Collection errorListener,
                                    java.lang.String code,
                                    java.lang.Object[] args,
                                    XmlObject location)
      • addError

        public static void addError​(java.util.Collection errorListener,
                                    java.lang.String code,
                                    java.lang.Object[] args,
                                    java.io.File location)
      • addError

        public static void addError​(java.util.Collection errorListener,
                                    java.lang.String code,
                                    java.lang.Object[] args,
                                    java.net.URL location)
      • addWarning

        public static void addWarning​(java.util.Collection errorListener,
                                      java.lang.String message,
                                      int code,
                                      XmlObject location)
      • addWarning

        public static void addWarning​(java.util.Collection errorListener,
                                      java.lang.String code,
                                      java.lang.Object[] args,
                                      XmlObject location)
      • addInfo

        public static void addInfo​(java.util.Collection errorListener,
                                   java.lang.String message)
      • addInfo

        public static void addInfo​(java.util.Collection errorListener,
                                   java.lang.String code,
                                   java.lang.Object[] args)
      • setGivenTypeSystemName

        public void setGivenTypeSystemName​(java.lang.String name)
      • setTargetSchemaTypeSystem

        public void setTargetSchemaTypeSystem​(SchemaTypeSystemImpl target)
        Initializer for references to the SchemaTypeLoader
      • addSchemaDigest

        public void addSchemaDigest​(byte[] digest)
        Accumulates a schema digest...
      • sts

        public SchemaTypeSystemImpl sts()
        The SchemaTypeSystem which we're building types on behalf of.
      • shouldDownloadURI

        public boolean shouldDownloadURI​(java.lang.String uriString)
        True if the given URI is a local file
      • setOptions

        public void setOptions​(XmlOptions options)
        Initializer for compatMap.
      • getEntityResolver

        public org.xml.sax.EntityResolver 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 (restriciton) 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

        public void setBindingConfig​(BindingConfig config)
                              throws java.lang.IllegalArgumentException
        Initializer for the schema config object.
        Throws:
        java.lang.IllegalArgumentException
      • getBindingConfig

        public BindingConfig getBindingConfig()
                                       throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • getPackageOverride

        public java.lang.String getPackageOverride​(java.lang.String namespace)
        Looks up package override for a namespace URI
      • getJavaPrefix

        public java.lang.String getJavaPrefix​(java.lang.String namespace)
        Looks up package override for a namespace URI
      • getJavaSuffix

        public java.lang.String getJavaSuffix​(java.lang.String namespace)
        Looks up package override for a namespace URI
      • getJavaname

        public java.lang.String getJavaname​(javax.xml.namespace.QName qname,
                                            int kind)
        Looks up configured java name for the given qname.
      • clearThreadLocals

        public static void clearThreadLocals()
      • end

        public static void end()
      • notFoundError

        public void notFoundError​(javax.xml.namespace.QName itemName,
                                  int code,
                                  XmlObject loc,
                                  boolean recovered)
      • sourceNameForUri

        public java.lang.String sourceNameForUri​(java.lang.String uri)
        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

        public java.util.Map 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

        public void setBaseUri​(java.net.URI uri)
        The base URI to use for nice filenames when saving sources.
      • relativize

        public java.lang.String relativize​(java.lang.String uri)
      • computeSavedFilename

        public java.lang.String computeSavedFilename​(java.lang.String uri)
      • addSourceUri

        public void addSourceUri​(java.lang.String uri,
                                 java.lang.String nameToUse)
        Notes another URI that has been consumed during compilation (this is the URI that is in the document .NAME property)
      • getErrorListener

        public java.util.Collection getErrorListener()
        Returns the error listener being filled in during this compilation
      • getS4SLoader

        public SchemaTypeLoader getS4SLoader()
        Returns the schema type loader to use for processing s4s
      • getSchemasDir

        public java.io.File getSchemasDir()
      • setSchemasDir

        public void setSchemasDir​(java.io.File _schemasDir)