public class PrismSchemaImpl extends Object implements PrismSchema
Modifier and Type | Field and Description |
---|---|
protected Collection<Definition> |
definitions |
protected String |
namespace |
protected PrismContext |
prismContext |
INDENT_STRING
Modifier | Constructor and Description |
---|---|
protected |
PrismSchemaImpl(PrismContext prismContext) |
|
PrismSchemaImpl(String namespace,
PrismContext prismContext) |
Modifier and Type | Method and Description |
---|---|
void |
add(Definition def) |
ComplexTypeDefinition |
createComplexTypeDefinition(QName typeName) |
PrismContainerDefinitionImpl |
createPropertyContainerDefinition(String localTypeName)
Creates a new property container definition and adds it to the schema.
|
PrismContainerDefinitionImpl |
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.
|
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator.
|
String |
debugDump(int indent) |
<C extends Containerable> |
findComplexTypeDefinitionByCompileTimeClass(Class<C> compileTimeClass) |
<ID extends ItemDefinition> |
findItemDefinitionByType(QName typeName,
Class<ID> definitionClass) |
<ID extends ItemDefinition> |
findItemDefinitionsByCompileTimeClass(Class<?> compileTimeClass,
Class<ID> definitionClass) |
<ID extends ItemDefinition> |
findItemDefinitionsByElementName(QName elementName,
Class<ID> definitionClass) |
<TD extends TypeDefinition> |
findTypeDefinitionByCompileTimeClass(Class<?> compileTimeClass,
Class<TD> definitionClass) |
<TD extends TypeDefinition> |
findTypeDefinitionByType(QName typeName,
Class<TD> definitionClass) |
<TD extends TypeDefinition> |
findTypeDefinitionsByType(QName typeName,
Class<TD> definitionClass) |
Collection<Definition> |
getDefinitions()
Returns set of definitions.
|
<T extends Definition> |
getDefinitions(Class<T> type)
Returns set of definitions of a given 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,
boolean allowDelayedItemDefinitions,
PrismContext prismContext) |
protected static PrismSchema |
parse(Element element,
PrismSchemaImpl schema,
boolean isRuntime,
String shortDescription,
PrismContext prismContext) |
static void |
parseSchemas(Element wrapperElement,
XmlEntityResolver resolver,
List<SchemaDescription> schemaDescriptions,
boolean allowDelayedItemDefinitions,
PrismContext prismContext) |
Document |
serializeToXsd() |
void |
setNamespace(String namespace) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComplexTypeDefinitions, getObjectDefinitions
debugDumpLazily, debugDumpLazily
findComplexTypeDefinition, findComplexTypeDefinitionByType, findContainerDefinitionByCompileTimeClass, findContainerDefinitionByElementName, findContainerDefinitionByType, findItemDefinition, findItemDefinition, findItemDefinitionByCompileTimeClass, findItemDefinitionByElementName, findItemDefinitionByElementName, findItemDefinitionByType, findItemDefinitionsByElementName, findObjectDefinitionByCompileTimeClass, findObjectDefinitionByElementName, findObjectDefinitionByType, findPropertyDefinitionByElementName, findReferenceDefinitionByElementName, findSimpleTypeDefinitionByType, findTypeDefinitionByType, findTypeDefinitionsByType
@NotNull protected final Collection<Definition> definitions
protected String namespace
protected PrismContext prismContext
protected PrismSchemaImpl(PrismContext prismContext)
public PrismSchemaImpl(@NotNull String namespace, PrismContext prismContext)
public String getNamespace()
PrismSchema
getNamespace
in interface PrismSchema
public void setNamespace(@NotNull String namespace)
@NotNull public Collection<Definition> getDefinitions()
PrismSchema
getDefinitions
in interface PrismSchema
@NotNull public <T extends Definition> List<T> getDefinitions(@NotNull Class<T> type)
PrismSchema
getDefinitions
in interface PrismSchema
public boolean isEmpty()
isEmpty
in interface PrismSchema
public void add(@NotNull Definition def)
public PrismContext getPrismContext()
getPrismContext
in interface PrismSchema
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, boolean allowDelayedItemDefinitions, PrismContext prismContext) throws SchemaException
SchemaException
public static void parseSchemas(Element wrapperElement, XmlEntityResolver resolver, List<SchemaDescription> schemaDescriptions, boolean allowDelayedItemDefinitions, PrismContext prismContext) throws SchemaException
SchemaException
protected static PrismSchema parse(Element element, PrismSchemaImpl schema, boolean isRuntime, String shortDescription, PrismContext prismContext) throws SchemaException
SchemaException
@NotNull public Document serializeToXsd() throws SchemaException
serializeToXsd
in interface PrismSchema
SchemaException
public PrismContainerDefinitionImpl createPropertyContainerDefinition(String localTypeName)
localTypeName
- type name "relative" to schema namespacepublic PrismContainerDefinitionImpl 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(QName name, QName typeName)
name
- element nametypeName
- XSD type name of the elementpublic String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
@NotNull public <ID extends ItemDefinition> List<ID> findItemDefinitionsByCompileTimeClass(@NotNull Class<?> compileTimeClass, @NotNull Class<ID> definitionClass)
findItemDefinitionsByCompileTimeClass
in interface GlobalDefinitionsStore
public <ID extends ItemDefinition> ID findItemDefinitionByType(@NotNull QName typeName, @NotNull Class<ID> definitionClass)
findItemDefinitionByType
in interface GlobalDefinitionsStore
@NotNull public <ID extends ItemDefinition> List<ID> findItemDefinitionsByElementName(@NotNull QName elementName, @NotNull Class<ID> definitionClass)
findItemDefinitionsByElementName
in interface GlobalDefinitionsStore
public <C extends Containerable> ComplexTypeDefinition findComplexTypeDefinitionByCompileTimeClass(@NotNull Class<C> compileTimeClass)
findComplexTypeDefinitionByCompileTimeClass
in interface GlobalDefinitionsStore
@Nullable public <TD extends TypeDefinition> TD findTypeDefinitionByType(@NotNull QName typeName, @NotNull Class<TD> definitionClass)
findTypeDefinitionByType
in interface GlobalDefinitionsStore
@NotNull public <TD extends TypeDefinition> Collection<TD> findTypeDefinitionsByType(@NotNull QName typeName, @NotNull Class<TD> definitionClass)
findTypeDefinitionsByType
in interface GlobalDefinitionsStore
@Nullable public <TD extends TypeDefinition> TD findTypeDefinitionByCompileTimeClass(@NotNull Class<?> compileTimeClass, @NotNull Class<TD> definitionClass)
findTypeDefinitionByCompileTimeClass
in interface GlobalDefinitionsStore
Copyright © 2019 Evolveum. All rights reserved.