Package com.android.repository.api
Class SchemaModule<T>
- java.lang.Object
-
- com.android.repository.api.SchemaModule<T>
-
public class SchemaModule<T> extends java.lang.ObjectRepresents a versioned set of generated classes corresponding to a versioned XML schema. This can be a single stand-alone schema, or an extension to an existing schema. For example,repo-common-N.xsddefines a schema for a repository with packages, and the collection of the schemas for all N would be represented by a singleSchemaModuleinstance. They can then be used for marshalling or unmarshalling XML documents by the repository framework.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSchemaModule.SchemaModuleVersion<R>Represents a single version of a schema, including a single XSD and a singleObjectFactory.
-
Constructor Summary
Constructors Constructor Description SchemaModule(java.lang.String ofPattern, java.lang.String xsdPattern, java.lang.Class<?> resourceRoot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TcreateLatestFactory()Creates anObjectFactoryfor the latest known version of this module.booleanequals(java.lang.Object obj)java.lang.StringgetLatestNamespace()Gets the namespace of the our latest schema version.java.lang.StringgetNamespacePrefix()Gets the namespace prefix (the namespace with the final number (if any) removed) for our latest schema version.java.util.Map<java.lang.String,SchemaModule.SchemaModuleVersion<T>>getNamespaceVersionMap()Gets the map of namespaces toSchemaModule.SchemaModuleVersions.inthashCode()
-
-
-
Constructor Detail
-
SchemaModule
public SchemaModule(@NonNull java.lang.String ofPattern, @NonNull java.lang.String xsdPattern, @NonNull java.lang.Class<?> resourceRoot)- Parameters:
ofPattern- Fully-qualified class name of the JAXBObjectFactoryclasses making up this module. Should have a single %d parameter, corresponding to the 1-indexed version of the schema.xsdPattern- Filename pattern of the XSDs making up this module. Should have a single %d parameter, corresponding to the 1-indexed version of the schema.resourceRoot- A class instance used viaClass.getResource(String)to read the XSD file.
-
-
Method Detail
-
createLatestFactory
@NonNull public T createLatestFactory()
Creates anObjectFactoryfor the latest known version of this module.
-
getNamespaceVersionMap
@NonNull public java.util.Map<java.lang.String,SchemaModule.SchemaModuleVersion<T>> getNamespaceVersionMap()
Gets the map of namespaces toSchemaModule.SchemaModuleVersions. Should only be needed by the repository framework.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getNamespacePrefix
@NonNull public java.lang.String getNamespacePrefix()
Gets the namespace prefix (the namespace with the final number (if any) removed) for our latest schema version.
-
getLatestNamespace
public java.lang.String getLatestNamespace()
Gets the namespace of the our latest schema version.
-
-