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
,TypeSystemHolder
,TypeSystemHolder
,TypeSystemHolder
,TypeSystemHolder
public class SchemaTypeSystemImpl extends SchemaTypeLoaderBase implements SchemaTypeSystem
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
SchemaTypeSystemImpl()
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 String
crackPointer(InputStream stream)
SchemaType[]
documentTypes()
Returns the document types defined in this loader.SchemaAttributeGroup.Ref
findAttributeGroupRef(QName name)
Used for on-demand loading.SchemaGlobalAttribute.Ref
findAttributeRef(QName name)
Used for on-demand loading.SchemaType.Ref
findAttributeTypeRef(QName name)
Used for on-demand loading.SchemaType.Ref
findDocumentTypeRef(QName name)
Used for on-demand loading.SchemaGlobalElement.Ref
findElementRef(QName name)
Used for on-demand loading.SchemaIdentityConstraint.Ref
findIdentityConstraintRef(QName name)
Used for on-demand loading.SchemaModelGroup.Ref
findModelGroupRef(QName name)
Used for on-demand loading.SchemaType.Ref
findTypeRef(QName name)
Used for on-demand loading.static SchemaTypeSystemImpl
forName(String name, ClassLoader loader)
ClassLoader
getClassLoader()
Returns the classloader used by this loader for resolving types.String
getMetadataPath()
Provide method to be overridden by user typesystems using a different metadata pathString
getName()
Returns the name of this loader.InputStream
getSourceAsStream(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.String
handleForType(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()
boolean
isIncomplete()
boolean
isNamespaceDefined(String namespace)
True if the typeloader contains any definitions in the given namespace.void
loadFromStscState(StscState state)
SchemaModelGroup[]
modelGroups()
Returns the model groups defined in this loader.SchemaAttributeGroup[]
redefinedAttributeGroups()
SchemaType[]
redefinedGlobalTypes()
SchemaModelGroup[]
redefinedModelGroups()
void
resolve()
Initializes a type system (resolves all handles within the type system).SchemaComponent
resolveHandle(String handle)
Locates a type, element, or attribute using the handle.void
save(Filer filer)
Saves this type system using a Filervoid
saveAttributeGroup(SchemaAttributeGroup grp)
void
saveAttributeGroups(SchemaAttributeGroup[] groups)
void
saveGlobalAttribute(SchemaGlobalAttribute attr)
void
saveGlobalAttributes(SchemaGlobalAttribute[] attrs)
void
saveGlobalElement(SchemaGlobalElement elt)
void
saveGlobalElements(SchemaGlobalElement[] elts)
void
saveIdentityConstraint(SchemaIdentityConstraint idc)
void
saveIdentityConstraints(SchemaIdentityConstraint[] idcs)
void
saveModelGroup(SchemaModelGroup grp)
void
saveModelGroups(SchemaModelGroup[] groups)
void
saveToDirectory(File classDir)
Saves this type system to a directory.SchemaType
typeForClassname(String classname)
Finds a type for a given fully-qualified XML Bean classnameSchemaType
typeForHandle(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, typeForSignature
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:SchemaTypeSystem
Saves this type system to a directory.- Specified by:
saveToDirectory
in interfaceSchemaTypeSystem
-
save
Description copied from interface:SchemaTypeSystem
Saves this type system using a Filer- Specified by:
save
in interfaceSchemaTypeSystem
-
saveGlobalElements
-
saveGlobalAttributes
-
saveModelGroups
-
saveAttributeGroups
-
saveIdentityConstraints
-
saveGlobalElement
-
saveGlobalAttribute
-
saveModelGroup
-
saveAttributeGroup
-
saveIdentityConstraint
-
crackPointer
-
typeForHandle
Description copied from interface:SchemaTypeSystem
Locates a type, element, or attribute using the handle.- Specified by:
typeForHandle
in interfaceSchemaTypeSystem
-
typeForClassname
Description copied from interface:SchemaTypeLoader
Finds a type for a given fully-qualified XML Bean classname- Specified by:
typeForClassname
in interfaceSchemaTypeLoader
-
resolveHandle
Description copied from interface:SchemaTypeSystem
Locates a type, element, or attribute using the handle.- Specified by:
resolveHandle
in interfaceSchemaTypeSystem
-
resolve
public void resolve()Description copied from interface:SchemaTypeSystem
Initializes a type system (resolves all handles within the type system).- Specified by:
resolve
in interfaceSchemaTypeSystem
-
isNamespaceDefined
Description copied from interface:SchemaTypeLoader
True if the typeloader contains any definitions in the given namespace.- Specified by:
isNamespaceDefined
in interfaceSchemaTypeLoader
-
findTypeRef
Description copied from interface:SchemaTypeLoader
Used for on-demand loading.- Specified by:
findTypeRef
in interfaceSchemaTypeLoader
-
findDocumentTypeRef
Description copied from interface:SchemaTypeLoader
Used for on-demand loading.- Specified by:
findDocumentTypeRef
in interfaceSchemaTypeLoader
-
findAttributeTypeRef
Description copied from interface:SchemaTypeLoader
Used for on-demand loading.- Specified by:
findAttributeTypeRef
in interfaceSchemaTypeLoader
-
findElementRef
Description copied from interface:SchemaTypeLoader
Used for on-demand loading.- Specified by:
findElementRef
in interfaceSchemaTypeLoader
-
findAttributeRef
Description copied from interface:SchemaTypeLoader
Used for on-demand loading.- Specified by:
findAttributeRef
in interfaceSchemaTypeLoader
-
findModelGroupRef
Description copied from interface:SchemaTypeLoader
Used for on-demand loading.- Specified by:
findModelGroupRef
in interfaceSchemaTypeLoader
-
findAttributeGroupRef
Description copied from interface:SchemaTypeLoader
Used for on-demand loading.- Specified by:
findAttributeGroupRef
in interfaceSchemaTypeLoader
-
findIdentityConstraintRef
Description copied from interface:SchemaTypeLoader
Used for on-demand loading.- Specified by:
findIdentityConstraintRef
in interfaceSchemaTypeLoader
-
globalTypes
Description copied from interface:SchemaTypeSystem
Returns the global types defined in this loader.- Specified by:
globalTypes
in interfaceSchemaTypeSystem
-
redefinedGlobalTypes
-
getSourceAsStream
Description copied from interface:SchemaTypeLoader
Loads original XSD source as a stream. SeeSchemaComponent.getSourceName()
.- Specified by:
getSourceAsStream
in interfaceSchemaTypeLoader
-
documentTypes
Description copied from interface:SchemaTypeSystem
Returns the document types defined in this loader.- Specified by:
documentTypes
in interfaceSchemaTypeSystem
-
attributeTypes
Description copied from interface:SchemaTypeSystem
Returns the attribute types defined in this loader.- Specified by:
attributeTypes
in interfaceSchemaTypeSystem
-
globalElements
Description copied from interface:SchemaTypeSystem
Returns the global elements defined in this loader.- Specified by:
globalElements
in interfaceSchemaTypeSystem
-
globalAttributes
Description copied from interface:SchemaTypeSystem
Returns the global attributes defined in this loader.- Specified by:
globalAttributes
in interfaceSchemaTypeSystem
-
modelGroups
Description copied from interface:SchemaTypeSystem
Returns the model groups defined in this loader.- Specified by:
modelGroups
in interfaceSchemaTypeSystem
-
redefinedModelGroups
-
attributeGroups
Description copied from interface:SchemaTypeSystem
Returns the attribute groups defined in this loader.- Specified by:
attributeGroups
in interfaceSchemaTypeSystem
-
redefinedAttributeGroups
-
annotations
Description copied from interface:SchemaTypeSystem
Returns the top-level annotations- Specified by:
annotations
in interfaceSchemaTypeSystem
-
identityConstraints
-
getClassLoader
Description copied from interface:SchemaTypeSystem
Returns the classloader used by this loader for resolving types.- Specified by:
getClassLoader
in 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:SchemaTypeSystem
Returns the name of this loader.- Specified by:
getName
in interfaceSchemaTypeSystem
-
getMetadataPath
Provide method to be overridden by user typesystems using a different metadata path- Returns:
- the metadata directory
- Since:
- XmlBeans 3.1.0
-