|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.prism.schema.PrismSchema
public class PrismSchema
Schema as a collection of definitions. This is a midPoint-specific view of schema definition. It is just a collection of definitions grouped under a specific namespace. The schema and all the public classes in this package define a schema meta-model. It is supposed to be used for run-time schema interpretation. It will not be a convenient tool to work with static data model objects such as user or role. But it is needed for interpreting dynamic schemas for resource objects, extensions and so on.
Field Summary | |
---|---|
protected java.util.Collection<Definition> |
definitions
|
protected java.lang.String |
namespace
|
protected PrismContext |
prismContext
|
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable |
---|
INDENT_STRING |
Constructor Summary | |
---|---|
protected |
PrismSchema(PrismContext prismContext)
|
|
PrismSchema(java.lang.String namespace,
PrismContext prismContext)
|
Method Summary | ||
---|---|---|
void |
add(Definition def)
|
|
ComplexTypeDefinition |
createComplexTypeDefinition(javax.xml.namespace.QName typeName)
|
|
PrismContainerDefinition |
createPropertyContainerDefinition(java.lang.String localTypeName)
Creates a new property container definition and adds it to the schema. |
|
PrismContainerDefinition |
createPropertyContainerDefinition(java.lang.String localElementName,
java.lang.String localTypeName)
|
|
PrismPropertyDefinition |
createPropertyDefinition(javax.xml.namespace.QName name,
javax.xml.namespace.QName typeName)
Creates a top-level property definition and adds it to the schema. |
|
PrismPropertyDefinition |
createPropertyDefinition(java.lang.String localName,
javax.xml.namespace.QName typeName)
Creates a top-level property definition and adds it to the schema. |
|
PrismPropertyDefinition |
createPropertyDefinition(java.lang.String localName,
java.lang.String localTypeName)
Creates a top-level property definition and adds it to the schema. |
|
java.lang.String |
debugDump()
Show the content of the object intended for diagnostics by system administrator. |
|
java.lang.String |
debugDump(int indent)
|
|
java.lang.String |
dump()
Show the content of the object intended for diagnostics by developer. |
|
ComplexTypeDefinition |
findComplexTypeDefinition(javax.xml.namespace.QName typeName)
Finds complex type definition by type name. |
|
PrismContainerDefinition |
findContainerDefinitionByElementName(javax.xml.namespace.QName elementName)
|
|
PrismContainerDefinition |
findContainerDefinitionByType(javax.xml.namespace.QName typeName)
Finds a PropertyContainerDefinition by the type name. |
|
|
findItemDefinition(javax.xml.namespace.QName definitionName,
java.lang.Class<T> definitionType)
Finds item definition by name. |
|
|
findItemDefinition(java.lang.String localName,
java.lang.Class<T> definitionType)
Finds item definition by local name |
|
|
findItemDefinitionByType(javax.xml.namespace.QName typeName,
java.lang.Class<T> definitionType)
Finds item definition by type. |
|
|
findObjectDefinitionByCompileTimeClass(java.lang.Class<T> type)
|
|
|
findObjectDefinitionByElementName(javax.xml.namespace.QName elementName)
|
|
|
findObjectDefinitionByType(javax.xml.namespace.QName typeName)
|
|
|
findObjectDefinitionByType(javax.xml.namespace.QName typeName,
java.lang.Class<T> type)
|
|
PrismPropertyDefinition |
findPropertyDefinitionByElementName(javax.xml.namespace.QName elementName)
|
|
java.util.Collection<Definition> |
getDefinitions()
Returns set of definitions. |
|
|
getDefinitions(java.lang.Class<T> type)
|
|
java.lang.String |
getNamespace()
Returns schema namespace. |
|
protected PrismContext |
getPrismContext()
|
|
boolean |
isEmpty()
|
|
protected static PrismSchema |
parse(org.w3c.dom.Element element,
org.xml.sax.EntityResolver resolver,
PrismSchema schema,
java.lang.String shortDescription,
PrismContext prismContext)
|
|
static PrismSchema |
parse(org.w3c.dom.Element element,
org.xml.sax.EntityResolver resolver,
java.lang.String shortDescription,
PrismContext prismContext)
|
|
protected static PrismSchema |
parse(org.w3c.dom.Element element,
PrismSchema schema,
java.lang.String shortDescription,
PrismContext prismContext)
|
|
static PrismSchema |
parse(org.w3c.dom.Element element,
java.lang.String shortDescription,
PrismContext prismContext)
|
|
org.w3c.dom.Document |
serializeToXsd()
|
|
void |
setNamespace(java.lang.String namespace)
|
|
protected java.lang.String |
toElementName(java.lang.String localTypeName)
Internal method to create a "nice" element name from the type name. |
|
protected javax.xml.namespace.QName |
toElementQName(javax.xml.namespace.QName qname)
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String namespace
protected java.util.Collection<Definition> definitions
protected PrismContext prismContext
Constructor Detail |
---|
protected PrismSchema(PrismContext prismContext)
public PrismSchema(java.lang.String namespace, PrismContext prismContext)
Method Detail |
---|
public java.lang.String getNamespace()
public void setNamespace(java.lang.String namespace)
public java.util.Collection<Definition> getDefinitions()
public <T extends Definition> java.util.Collection<T> getDefinitions(java.lang.Class<T> type)
public void add(Definition def)
protected PrismContext getPrismContext()
public static PrismSchema parse(org.w3c.dom.Element element, java.lang.String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
public static PrismSchema parse(org.w3c.dom.Element element, org.xml.sax.EntityResolver resolver, java.lang.String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
protected static PrismSchema parse(org.w3c.dom.Element element, PrismSchema schema, java.lang.String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
protected static PrismSchema parse(org.w3c.dom.Element element, org.xml.sax.EntityResolver resolver, PrismSchema schema, java.lang.String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
public org.w3c.dom.Document serializeToXsd() throws SchemaException
SchemaException
public PrismContainerDefinition findContainerDefinitionByType(javax.xml.namespace.QName typeName)
typeName
- property container type name
java.lang.IllegalStateException
- if more than one definition is foundpublic <X extends Objectable> PrismObjectDefinition<X> findObjectDefinitionByType(javax.xml.namespace.QName typeName)
public <X extends Objectable> PrismObjectDefinition<X> findObjectDefinitionByElementName(javax.xml.namespace.QName elementName)
public <T extends Objectable> PrismObjectDefinition<T> findObjectDefinitionByType(javax.xml.namespace.QName typeName, java.lang.Class<T> type)
public <T extends Objectable> PrismObjectDefinition<T> findObjectDefinitionByCompileTimeClass(java.lang.Class<T> type)
public PrismContainerDefinition findContainerDefinitionByElementName(javax.xml.namespace.QName elementName)
public PrismPropertyDefinition findPropertyDefinitionByElementName(javax.xml.namespace.QName elementName)
public ComplexTypeDefinition findComplexTypeDefinition(javax.xml.namespace.QName typeName)
public <T extends ItemDefinition> T findItemDefinition(javax.xml.namespace.QName definitionName, java.lang.Class<T> definitionType)
public <T extends ItemDefinition> T findItemDefinition(java.lang.String localName, java.lang.Class<T> definitionType)
public <T extends ItemDefinition> T findItemDefinitionByType(javax.xml.namespace.QName typeName, java.lang.Class<T> definitionType)
public boolean isEmpty()
public PrismContainerDefinition createPropertyContainerDefinition(java.lang.String localTypeName)
localTypeName
- type name "relative" to schema namespace
public PrismContainerDefinition createPropertyContainerDefinition(java.lang.String localElementName, java.lang.String localTypeName)
public ComplexTypeDefinition createComplexTypeDefinition(javax.xml.namespace.QName typeName)
public PrismPropertyDefinition createPropertyDefinition(java.lang.String localName, javax.xml.namespace.QName typeName)
localName
- element name "relative" to schema namespacetypeName
- XSD type name of the element
public PrismPropertyDefinition createPropertyDefinition(java.lang.String localName, java.lang.String localTypeName)
localName
- element name "relative" to schema namespacelocalTypeName
- XSD type name "relative" to schema namespace
public PrismPropertyDefinition createPropertyDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName typeName)
localName
- element nametypeName
- XSD type name of the element
protected java.lang.String toElementName(java.lang.String localTypeName)
protected javax.xml.namespace.QName toElementQName(javax.xml.namespace.QName qname)
public java.lang.String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public java.lang.String debugDump(int indent)
debugDump
in interface DebugDumpable
public java.lang.String dump()
Dumpable
dump
in interface Dumpable
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |