Package org.apache.xmlbeans.impl.schema
Class SchemaTypeSystemImpl
java.lang.Object
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl
- All Implemented Interfaces:
SchemaTypeLoader,SchemaTypeSystem
- Direct Known Subclasses:
TypeSystemHolder
public class SchemaTypeSystemImpl extends SchemaTypeLoaderBase implements SchemaTypeSystem
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedSchemaTypeSystemImpl()SchemaTypeSystemImpl(Class<?> indexclass)SchemaTypeSystemImpl(String nameForSystem)SchemaTypeSystemImpl(ResourceLoader resourceLoader, String name, SchemaTypeLoader linker) -
Method Summary
Modifier and Type Method Description SchemaAnnotation[]annotations()Returns the top-level annotationsSchemaAttributeGroup[]attributeGroups()Returns the attribute groups defined in this loader.SchemaType[]attributeTypes()Returns the attribute types defined in this loader.static StringcrackPointer(InputStream stream)SchemaType[]documentTypes()Returns the document types defined in this loader.SchemaAttributeGroup.ReffindAttributeGroupRef(QName name)Used for on-demand loading.SchemaGlobalAttribute.ReffindAttributeRef(QName name)Used for on-demand loading.SchemaType.ReffindAttributeTypeRef(QName name)Used for on-demand loading.SchemaType.ReffindDocumentTypeRef(QName name)Used for on-demand loading.SchemaGlobalElement.ReffindElementRef(QName name)Used for on-demand loading.SchemaIdentityConstraint.ReffindIdentityConstraintRef(QName name)Used for on-demand loading.SchemaModelGroup.ReffindModelGroupRef(QName name)Used for on-demand loading.SchemaType.ReffindTypeRef(QName name)Used for on-demand loading.static SchemaTypeSystemImplforName(String name, ClassLoader loader)ClassLoadergetClassLoader()Returns the classloader used by this loader for resolving types.StringgetMetadataPath()Provide method to be overridden by user typesystems using a different metadata pathStringgetName()Returns the name of this loader.InputStreamgetSourceAsStream(String sourceName)Loads original XSD source as a stream.SchemaGlobalAttribute[]globalAttributes()Returns the global attributes defined in this loader.SchemaGlobalElement[]globalElements()Returns the global elements defined in this loader.SchemaType[]globalTypes()Returns the global types defined in this loader.StringhandleForType(SchemaType type)Used INTERNALLY ONLY by the code output AFTER the type system has been saved and a handle has been established for each type.SchemaIdentityConstraint[]identityConstraints()booleanisIncomplete()booleanisNamespaceDefined(String namespace)True if the typeloader contains any definitions in the given namespace.voidloadFromStscState(StscState state)SchemaModelGroup[]modelGroups()Returns the model groups defined in this loader.SchemaAttributeGroup[]redefinedAttributeGroups()SchemaType[]redefinedGlobalTypes()SchemaModelGroup[]redefinedModelGroups()voidresolve()Initializes a type system (resolves all handles within the type system).SchemaComponentresolveHandle(String handle)Locates a type, element, or attribute using the handle.voidsave(Filer filer)Saves this type system using a FilervoidsaveAttributeGroup(SchemaAttributeGroup grp)voidsaveAttributeGroups(SchemaAttributeGroup[] groups)voidsaveGlobalAttribute(SchemaGlobalAttribute attr)voidsaveGlobalAttributes(SchemaGlobalAttribute[] attrs)voidsaveGlobalElement(SchemaGlobalElement elt)voidsaveGlobalElements(SchemaGlobalElement[] elts)voidsaveIdentityConstraint(SchemaIdentityConstraint idc)voidsaveIdentityConstraints(SchemaIdentityConstraint[] idcs)voidsaveModelGroup(SchemaModelGroup grp)voidsaveModelGroups(SchemaModelGroup[] groups)voidsaveToDirectory(File classDir)Saves this type system to a directory.SchemaTypetypeForClassname(String classname)Finds a type for a given fully-qualified XML Bean classnameSchemaTypetypeForHandle(String handle)Locates a type, element, or attribute using the handle.Methods inherited from class org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase
compilePath, compilePath, compileQuery, compileQuery, findAttribute, findAttributeGroup, findAttributeType, findDocumentType, findElement, findModelGroup, findType, newDomImplementation, newInstance, newXmlSaxHandler, parse, parse, parse, parse, parse, parse, parse, typeForSignatureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.xmlbeans.SchemaTypeLoader
compilePath, compileQuery, findAttribute, findAttributeGroup, findAttributeType, findDocumentType, findElement, findModelGroup, findType, newDomImplementation, newInstance, newXmlSaxHandler, parse, parse, parse, parse, parse, parse, parse, typeForSignature
-
Field Details
-
DATA_BABE
public static final int DATA_BABE- See Also:
- Constant Field Values
-
MAJOR_VERSION
public static final int MAJOR_VERSION- See Also:
- Constant Field Values
-
MINOR_VERSION
public static final int MINOR_VERSION- See Also:
- Constant Field Values
-
RELEASE_NUMBER
public static final int RELEASE_NUMBER- See Also:
- Constant Field Values
-
FILETYPE_SCHEMAINDEX
public static final int FILETYPE_SCHEMAINDEX- See Also:
- Constant Field Values
-
FILETYPE_SCHEMATYPE
public static final int FILETYPE_SCHEMATYPE- See Also:
- Constant Field Values
-
FILETYPE_SCHEMAELEMENT
public static final int FILETYPE_SCHEMAELEMENT- See Also:
- Constant Field Values
-
FILETYPE_SCHEMAATTRIBUTE
public static final int FILETYPE_SCHEMAATTRIBUTE- See Also:
- Constant Field Values
-
FILETYPE_SCHEMAPOINTER
public static final int FILETYPE_SCHEMAPOINTER- See Also:
- Constant Field Values
-
FILETYPE_SCHEMAMODELGROUP
public static final int FILETYPE_SCHEMAMODELGROUP- See Also:
- Constant Field Values
-
FILETYPE_SCHEMAATTRIBUTEGROUP
public static final int FILETYPE_SCHEMAATTRIBUTEGROUP- See Also:
- Constant Field Values
-
FILETYPE_SCHEMAIDENTITYCONSTRAINT
public static final int FILETYPE_SCHEMAIDENTITYCONSTRAINT- See Also:
- Constant Field Values
-
FLAG_PART_SKIPPABLE
public static final int FLAG_PART_SKIPPABLE- See Also:
- Constant Field Values
-
FLAG_PART_FIXED
public static final int FLAG_PART_FIXED- See Also:
- Constant Field Values
-
FLAG_PART_NILLABLE
public static final int FLAG_PART_NILLABLE- See Also:
- Constant Field Values
-
FLAG_PART_BLOCKEXT
public static final int FLAG_PART_BLOCKEXT- See Also:
- Constant Field Values
-
FLAG_PART_BLOCKREST
public static final int FLAG_PART_BLOCKREST- See Also:
- Constant Field Values
-
FLAG_PART_BLOCKSUBST
public static final int FLAG_PART_BLOCKSUBST- See Also:
- Constant Field Values
-
FLAG_PART_ABSTRACT
public static final int FLAG_PART_ABSTRACT- See Also:
- Constant Field Values
-
FLAG_PART_FINALEXT
public static final int FLAG_PART_FINALEXT- See Also:
- Constant Field Values
-
FLAG_PART_FINALREST
public static final int FLAG_PART_FINALREST- See Also:
- Constant Field Values
-
FLAG_PROP_ISATTR
public static final int FLAG_PROP_ISATTR- See Also:
- Constant Field Values
-
FLAG_PROP_JAVASINGLETON
public static final int FLAG_PROP_JAVASINGLETON- See Also:
- Constant Field Values
-
FLAG_PROP_JAVAOPTIONAL
public static final int FLAG_PROP_JAVAOPTIONAL- See Also:
- Constant Field Values
-
FLAG_PROP_JAVAARRAY
public static final int FLAG_PROP_JAVAARRAY- See Also:
- Constant Field Values
-
FIELD_NONE
public static final int FIELD_NONE- See Also:
- Constant Field Values
-
FIELD_GLOBAL
public static final int FIELD_GLOBAL- See Also:
- Constant Field Values
-
FIELD_LOCALATTR
public static final int FIELD_LOCALATTR- See Also:
- Constant Field Values
-
FIELD_LOCALELT
public static final int FIELD_LOCALELT- See Also:
- Constant Field Values
-
METADATA_PACKAGE_GEN
This is to support the feature of a separate/private XMLBeans distribution that will not colide with the public org apache xmlbeans one. METADATA_PACKAGE_GEN will be "" for the original and something like com.mycompany.private.xmlbeans for a private distribution of XMLBeans.There are two properties: METADATA_PACKAGE_GEN - used for generating metadata and METADATA_PACKAGE_LOAD - used for loading the metadata. Most of the time they have the same value, with one exception, during the repackage process scomp needs to load from old package and generate into a new package.
-
-
Constructor Details
-
SchemaTypeSystemImpl
protected SchemaTypeSystemImpl() -
SchemaTypeSystemImpl
-
SchemaTypeSystemImpl
-
SchemaTypeSystemImpl
-
-
Method Details
-
forName
-
loadFromStscState
-
isIncomplete
public boolean isIncomplete() -
saveToDirectory
Description copied from interface:SchemaTypeSystemSaves this type system to a directory.- Specified by:
saveToDirectoryin interfaceSchemaTypeSystem
-
save
Description copied from interface:SchemaTypeSystemSaves this type system using a Filer- Specified by:
savein interfaceSchemaTypeSystem
-
saveGlobalElements
-
saveGlobalAttributes
-
saveModelGroups
-
saveAttributeGroups
-
saveIdentityConstraints
-
saveGlobalElement
-
saveGlobalAttribute
-
saveModelGroup
-
saveAttributeGroup
-
saveIdentityConstraint
-
crackPointer
-
typeForHandle
Description copied from interface:SchemaTypeSystemLocates a type, element, or attribute using the handle.- Specified by:
typeForHandlein interfaceSchemaTypeSystem
-
typeForClassname
Description copied from interface:SchemaTypeLoaderFinds a type for a given fully-qualified XML Bean classname- Specified by:
typeForClassnamein interfaceSchemaTypeLoader
-
resolveHandle
Description copied from interface:SchemaTypeSystemLocates a type, element, or attribute using the handle.- Specified by:
resolveHandlein interfaceSchemaTypeSystem
-
resolve
public void resolve()Description copied from interface:SchemaTypeSystemInitializes a type system (resolves all handles within the type system).- Specified by:
resolvein interfaceSchemaTypeSystem
-
isNamespaceDefined
Description copied from interface:SchemaTypeLoaderTrue if the typeloader contains any definitions in the given namespace.- Specified by:
isNamespaceDefinedin interfaceSchemaTypeLoader
-
findTypeRef
Description copied from interface:SchemaTypeLoaderUsed for on-demand loading.- Specified by:
findTypeRefin interfaceSchemaTypeLoader
-
findDocumentTypeRef
Description copied from interface:SchemaTypeLoaderUsed for on-demand loading.- Specified by:
findDocumentTypeRefin interfaceSchemaTypeLoader
-
findAttributeTypeRef
Description copied from interface:SchemaTypeLoaderUsed for on-demand loading.- Specified by:
findAttributeTypeRefin interfaceSchemaTypeLoader
-
findElementRef
Description copied from interface:SchemaTypeLoaderUsed for on-demand loading.- Specified by:
findElementRefin interfaceSchemaTypeLoader
-
findAttributeRef
Description copied from interface:SchemaTypeLoaderUsed for on-demand loading.- Specified by:
findAttributeRefin interfaceSchemaTypeLoader
-
findModelGroupRef
Description copied from interface:SchemaTypeLoaderUsed for on-demand loading.- Specified by:
findModelGroupRefin interfaceSchemaTypeLoader
-
findAttributeGroupRef
Description copied from interface:SchemaTypeLoaderUsed for on-demand loading.- Specified by:
findAttributeGroupRefin interfaceSchemaTypeLoader
-
findIdentityConstraintRef
Description copied from interface:SchemaTypeLoaderUsed for on-demand loading.- Specified by:
findIdentityConstraintRefin interfaceSchemaTypeLoader
-
globalTypes
Description copied from interface:SchemaTypeSystemReturns the global types defined in this loader.- Specified by:
globalTypesin interfaceSchemaTypeSystem
-
redefinedGlobalTypes
-
getSourceAsStream
Description copied from interface:SchemaTypeLoaderLoads original XSD source as a stream. SeeSchemaComponent.getSourceName().- Specified by:
getSourceAsStreamin interfaceSchemaTypeLoader
-
documentTypes
Description copied from interface:SchemaTypeSystemReturns the document types defined in this loader.- Specified by:
documentTypesin interfaceSchemaTypeSystem
-
attributeTypes
Description copied from interface:SchemaTypeSystemReturns the attribute types defined in this loader.- Specified by:
attributeTypesin interfaceSchemaTypeSystem
-
globalElements
Description copied from interface:SchemaTypeSystemReturns the global elements defined in this loader.- Specified by:
globalElementsin interfaceSchemaTypeSystem
-
globalAttributes
Description copied from interface:SchemaTypeSystemReturns the global attributes defined in this loader.- Specified by:
globalAttributesin interfaceSchemaTypeSystem
-
modelGroups
Description copied from interface:SchemaTypeSystemReturns the model groups defined in this loader.- Specified by:
modelGroupsin interfaceSchemaTypeSystem
-
redefinedModelGroups
-
attributeGroups
Description copied from interface:SchemaTypeSystemReturns the attribute groups defined in this loader.- Specified by:
attributeGroupsin interfaceSchemaTypeSystem
-
redefinedAttributeGroups
-
annotations
Description copied from interface:SchemaTypeSystemReturns the top-level annotations- Specified by:
annotationsin interfaceSchemaTypeSystem
-
identityConstraints
-
getClassLoader
Description copied from interface:SchemaTypeSystemReturns the classloader used by this loader for resolving types.- Specified by:
getClassLoaderin interfaceSchemaTypeSystem
-
handleForType
Used INTERNALLY ONLY by the code output AFTER the type system has been saved and a handle has been established for each type. -
getName
Description copied from interface:SchemaTypeSystemReturns the name of this loader.- Specified by:
getNamein interfaceSchemaTypeSystem
-
getMetadataPath
Provide method to be overridden by user typesystems using a different metadata path- Returns:
- the metadata directory
- Since:
- XmlBeans 3.1.0
-