public class PrismSchema extends Object implements Dumpable, DebugDumpable
Modifier and Type | Field and Description |
---|---|
protected Collection<Definition> |
definitions |
protected String |
namespace |
protected PrismContext |
prismContext |
INDENT_STRING
Modifier | Constructor and Description |
---|---|
protected |
PrismSchema(PrismContext prismContext) |
|
PrismSchema(String namespace,
PrismContext prismContext) |
Modifier and Type | Method and Description |
---|---|
void |
add(Definition def) |
ComplexTypeDefinition |
createComplexTypeDefinition(QName typeName) |
PrismContainerDefinition |
createPropertyContainerDefinition(String localTypeName)
Creates a new property container definition and adds it to the schema.
|
PrismContainerDefinition |
createPropertyContainerDefinition(String localElementName,
String localTypeName) |
PrismPropertyDefinition |
createPropertyDefinition(QName name,
QName typeName)
Creates a top-level property definition and adds it to the schema.
|
PrismPropertyDefinition |
createPropertyDefinition(String localName,
QName typeName)
Creates a top-level property definition and adds it to the schema.
|
PrismPropertyDefinition |
createPropertyDefinition(String localName,
String localTypeName)
Creates a top-level property definition and adds it to the schema.
|
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator.
|
String |
debugDump(int indent) |
String |
dump()
Show the content of the object intended for diagnostics by developer.
|
ComplexTypeDefinition |
findComplexTypeDefinition(QName typeName)
Finds complex type definition by type name.
|
PrismContainerDefinition |
findContainerDefinitionByElementName(QName elementName) |
PrismContainerDefinition |
findContainerDefinitionByType(QName typeName)
Finds a PropertyContainerDefinition by the type name.
|
<T extends ItemDefinition> |
findItemDefinition(QName definitionName,
Class<T> definitionType)
Finds item definition by name.
|
<T extends ItemDefinition> |
findItemDefinition(String localName,
Class<T> definitionType)
Finds item definition by local name
|
<T extends ItemDefinition> |
findItemDefinitionByType(QName typeName,
Class<T> definitionType)
Finds item definition by type.
|
<T extends Objectable> |
findObjectDefinitionByCompileTimeClass(Class<T> type) |
<X extends Objectable> |
findObjectDefinitionByElementName(QName elementName) |
<X extends Objectable> |
findObjectDefinitionByType(QName typeName) |
<T extends Objectable> |
findObjectDefinitionByType(QName typeName,
Class<T> type) |
PrismPropertyDefinition |
findPropertyDefinitionByElementName(QName elementName) |
PrismReferenceDefinition |
findReferenceDefinitionByElementName(QName elementName) |
Collection<Definition> |
getDefinitions()
Returns set of definitions.
|
<T extends Definition> |
getDefinitions(Class<T> type) |
String |
getNamespace()
Returns schema namespace.
|
PrismContext |
getPrismContext() |
boolean |
isEmpty() |
static PrismSchema |
parse(Element element,
boolean isRuntime,
String shortDescription,
PrismContext prismContext) |
static PrismSchema |
parse(Element element,
EntityResolver resolver,
boolean isRuntime,
String shortDescription,
PrismContext prismContext) |
protected static PrismSchema |
parse(Element element,
EntityResolver resolver,
PrismSchema schema,
boolean isRuntime,
String shortDescription,
PrismContext prismContext) |
protected static PrismSchema |
parse(Element element,
PrismSchema schema,
boolean isRuntime,
String shortDescription,
PrismContext prismContext) |
Document |
serializeToXsd() |
void |
setNamespace(String namespace) |
protected String |
toElementName(String localTypeName)
Internal method to create a "nice" element name from the type name.
|
protected QName |
toElementQName(QName qname) |
String |
toString() |
protected String namespace
protected Collection<Definition> definitions
protected PrismContext prismContext
protected PrismSchema(PrismContext prismContext)
public PrismSchema(String namespace, PrismContext prismContext)
public String getNamespace()
public void setNamespace(String namespace)
public Collection<Definition> getDefinitions()
public <T extends Definition> Collection<T> getDefinitions(Class<T> type)
public void add(Definition def)
public PrismContext getPrismContext()
public static PrismSchema parse(Element element, boolean isRuntime, String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
public static PrismSchema parse(Element element, EntityResolver resolver, boolean isRuntime, String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
protected static PrismSchema parse(Element element, PrismSchema schema, boolean isRuntime, String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
protected static PrismSchema parse(Element element, EntityResolver resolver, PrismSchema schema, boolean isRuntime, String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
public Document serializeToXsd() throws SchemaException
SchemaException
public PrismContainerDefinition findContainerDefinitionByType(QName typeName)
typeName
- property container type nameIllegalStateException
- if more than one definition is foundpublic <X extends Objectable> PrismObjectDefinition<X> findObjectDefinitionByType(QName typeName)
public <X extends Objectable> PrismObjectDefinition<X> findObjectDefinitionByElementName(QName elementName)
public <T extends Objectable> PrismObjectDefinition<T> findObjectDefinitionByType(QName typeName, Class<T> type)
public <T extends Objectable> PrismObjectDefinition<T> findObjectDefinitionByCompileTimeClass(Class<T> type)
public PrismContainerDefinition findContainerDefinitionByElementName(QName elementName)
public PrismPropertyDefinition findPropertyDefinitionByElementName(QName elementName)
public PrismReferenceDefinition findReferenceDefinitionByElementName(QName elementName)
public ComplexTypeDefinition findComplexTypeDefinition(QName typeName)
public <T extends ItemDefinition> T findItemDefinition(QName definitionName, Class<T> definitionType)
public <T extends ItemDefinition> T findItemDefinition(String localName, Class<T> definitionType)
public <T extends ItemDefinition> T findItemDefinitionByType(QName typeName, Class<T> definitionType)
public boolean isEmpty()
public PrismContainerDefinition createPropertyContainerDefinition(String localTypeName)
localTypeName
- type name "relative" to schema namespacepublic PrismContainerDefinition createPropertyContainerDefinition(String localElementName, String localTypeName)
public ComplexTypeDefinition createComplexTypeDefinition(QName typeName)
public PrismPropertyDefinition createPropertyDefinition(String localName, QName typeName)
localName
- element name "relative" to schema namespacetypeName
- XSD type name of the elementpublic PrismPropertyDefinition createPropertyDefinition(String localName, String localTypeName)
localName
- element name "relative" to schema namespacelocalTypeName
- XSD type name "relative" to schema namespacepublic PrismPropertyDefinition createPropertyDefinition(QName name, QName typeName)
localName
- element nametypeName
- XSD type name of the elementprotected String toElementName(String localTypeName)
public String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
public String dump()
Dumpable
Copyright © 2013 evolveum. All rights reserved.