|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.schema.processor.Definition
com.evolveum.midpoint.schema.processor.ItemDefinition
com.evolveum.midpoint.schema.processor.PropertyContainerDefinition
public class PropertyContainerDefinition
Definition of a property container.
Property container groups properties into logical blocks. The reason for
grouping may be as simple as better understandability of data structure. But
the group usually means different meaning, source or structure of the data.
For example, the property container is frequently used to hold properties
that are dynamic, not fixed by a static schema. Such grouping also naturally
translates to XML and helps to "quarantine" such properties to avoid Unique
Particle Attribute problems.
Property Container contains a set of (potentially multi-valued) properties.
The order of properties is not significant, regardless of the fact that it
may be fixed in the XML representation. In the XML representation, each
element inside Property Container must be either Property or a Property
Container.
This class represents schema definition for property container. See
Definition
for more details.
Field Summary | |
---|---|
protected ComplexTypeDefinition |
complexTypeDefinition
|
protected Schema |
schema
|
Fields inherited from class com.evolveum.midpoint.schema.processor.ItemDefinition |
---|
name |
Fields inherited from class com.evolveum.midpoint.schema.processor.Definition |
---|
defaultName, displayName, help, ignored, typeName |
Method Summary | ||
---|---|---|
PropertyDefinition |
createPropertyDefinition(javax.xml.namespace.QName name)
|
|
PropertyDefinition |
createPropertyDefinition(javax.xml.namespace.QName name,
javax.xml.namespace.QName typeName)
Creates new instance of property definition and adds it to the container. |
|
PropertyDefinition |
createPropertyDefinition(javax.xml.namespace.QName name,
javax.xml.namespace.QName typeName,
int minOccurs,
int maxOccurs)
Creates new instance of property definition and adds it to the container. |
|
PropertyDefinition |
createPropertyDefinition(java.lang.String localName,
javax.xml.namespace.QName typeName)
Creates new instance of property definition and adds it to the container. |
|
PropertyDefinition |
createPropertyDefinition(java.lang.String localName,
java.lang.String localTypeName)
Creates new instance of property definition and adds it to the container. |
|
PropertyDefinition |
createPropertyDefinition(java.lang.String localName,
java.lang.String localTypeName,
int minOccurs,
int maxOccurs)
Creates new instance of property definition and adds it to the container. |
|
java.lang.String |
dump(int indent)
|
|
ItemDefinition |
findItemDefinition(javax.xml.namespace.QName name)
|
|
protected
|
findItemDefinition(javax.xml.namespace.QName name,
java.lang.Class<T> clazz)
|
|
PropertyContainerDefinition |
findPropertyContainerDefinition(javax.xml.namespace.QName name)
Finds an inner PropertyContainerDefinition by looking at the property container name. |
|
PropertyDefinition |
findPropertyDefinition(javax.xml.namespace.QName name)
Finds a PropertyDefinition by looking at the property name. |
|
java.util.Set<ItemDefinition> |
getDefinitions()
Returns set of property definitions. |
|
java.util.Set<PropertyDefinition> |
getPropertyDefinitions()
Returns set of property definitions. |
|
protected java.lang.String |
getSchemaNamespace()
|
|
PropertyContainer |
instantiate()
Create property container instance with a default name. |
|
PropertyContainer |
instantiate(javax.xml.namespace.QName name)
Create property container instance with a specified name. |
|
PropertyContainer |
instantiate(javax.xml.namespace.QName name,
java.lang.Object element)
Create property container instance with a specified name and element. |
|
boolean |
isEmpty()
|
|
PropertyContainer |
parseAsContent(javax.xml.namespace.QName name,
java.util.List<java.lang.Object> contentElements)
|
|
protected
|
parseAsContent(javax.xml.namespace.QName name,
java.util.List<java.lang.Object> contentElements,
java.lang.Class<T> type)
|
|
PropertyContainer |
parseItem(java.util.List<java.lang.Object> elements)
Creates new property container from DOM or JAXB representation (multiple elements). |
|
PropertyContainer |
parseItem(java.lang.Object element)
Creates new property container from DOM or JAXB representation (single element). |
|
protected
|
parseItem(java.lang.Object element,
java.lang.Class<T> type)
Creates new property container from DOM or JAXB representation (multiple elements). |
|
java.util.Set<Item> |
parseItems(java.util.List<java.lang.Object> elements)
Parses items from a list of elements. |
|
protected java.util.Set<Item> |
parseItems(java.util.List<java.lang.Object> elements,
java.util.Set<? extends ItemDefinition> selection)
Parses items from a list of elements. |
Methods inherited from class com.evolveum.midpoint.schema.processor.ItemDefinition |
---|
getName, getNameOrDefaultName, toString |
Methods inherited from class com.evolveum.midpoint.schema.processor.Definition |
---|
dump, getDefaultName, getDisplayName, getHelp, getTypeName, isIgnored, setDisplayName, setHelp, setIgnored |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ComplexTypeDefinition complexTypeDefinition
protected Schema schema
Method Detail |
---|
protected java.lang.String getSchemaNamespace()
protected <T extends ItemDefinition> T findItemDefinition(javax.xml.namespace.QName name, java.lang.Class<T> clazz)
public ItemDefinition findItemDefinition(javax.xml.namespace.QName name)
public PropertyDefinition findPropertyDefinition(javax.xml.namespace.QName name)
name
- property definition name
public PropertyContainerDefinition findPropertyContainerDefinition(javax.xml.namespace.QName name)
name
- property container definition name
public java.util.Set<ItemDefinition> getDefinitions()
public java.util.Set<PropertyDefinition> getPropertyDefinitions()
public PropertyContainer instantiate()
instantiate
in class ItemDefinition
public PropertyContainer instantiate(javax.xml.namespace.QName name)
instantiate
in class ItemDefinition
public PropertyContainer instantiate(javax.xml.namespace.QName name, java.lang.Object element)
instantiate
in class ItemDefinition
public PropertyDefinition createPropertyDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName typeName)
name
- name of the property (element name)typeName
- XSD type of the property
public PropertyDefinition createPropertyDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName typeName, int minOccurs, int maxOccurs)
name
- name of the property (element name)typeName
- XSD type of the propertyminOccurs
- minimal number of occurrencesmaxOccurs
- maximal number of occurrences (-1 means unbounded)
public PropertyDefinition createPropertyDefinition(javax.xml.namespace.QName name)
public PropertyDefinition createPropertyDefinition(java.lang.String localName, javax.xml.namespace.QName typeName)
localName
- name of the property (element name) relative to the schema namespacetypeName
- XSD type of the property
public PropertyDefinition createPropertyDefinition(java.lang.String localName, java.lang.String localTypeName)
localName
- name of the property (element name) relative to the schema namespacelocalTypeName
- XSD type of the property
public PropertyDefinition createPropertyDefinition(java.lang.String localName, java.lang.String localTypeName, int minOccurs, int maxOccurs)
localName
- name of the property (element name) relative to the schema namespacelocalTypeName
- XSD type of the propertyminOccurs
- minimal number of occurrencesmaxOccurs
- maximal number of occurrences (-1 means unbounded)
public PropertyContainer parseItem(java.lang.Object element) throws SchemaException
element
- DOM representation of property container
SchemaException
- error parsing the elementpublic PropertyContainer parseItem(java.util.List<java.lang.Object> elements) throws SchemaException
parseItem
in class ItemDefinition
elements
- DOM or JAXB representation of property container
SchemaException
- error parsing the elementsprotected <T extends PropertyContainer> T parseItem(java.lang.Object element, java.lang.Class<T> type) throws SchemaException
T
- subclass of property container to returnelement
- JAXB or DOM element representing the containertype
- subclass of property container to return
SchemaException
- error parsing the elementspublic PropertyContainer parseAsContent(javax.xml.namespace.QName name, java.util.List<java.lang.Object> contentElements) throws SchemaException
SchemaException
protected <T extends PropertyContainer> T parseAsContent(javax.xml.namespace.QName name, java.util.List<java.lang.Object> contentElements, java.lang.Class<T> type) throws SchemaException
SchemaException
public java.util.Set<Item> parseItems(java.util.List<java.lang.Object> elements) throws SchemaException
elements
- list of elements with serialized properties
SchemaProcessorException
- error parsing the elements
SchemaException
protected java.util.Set<Item> parseItems(java.util.List<java.lang.Object> elements, java.util.Set<? extends ItemDefinition> selection) throws SchemaException
SchemaException
public java.lang.String dump(int indent)
dump
in class Definition
public boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |