Package org.nuxeo.ecm.core.schema.types
Class CompositeTypeImpl
java.lang.Object
org.nuxeo.ecm.core.schema.types.AbstractType
org.nuxeo.ecm.core.schema.types.ComplexTypeImpl
org.nuxeo.ecm.core.schema.types.CompositeTypeImpl
- All Implemented Interfaces:
Serializable
,ComplexType
,CompositeType
,Type
- Direct Known Subclasses:
DocumentTypeImpl
A Composite Type resolves fields for several schemas.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionThe schemas for this composite type.Fields inherited from class org.nuxeo.ecm.core.schema.types.ComplexTypeImpl
fields, fieldsByName, ns
Fields inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
constraints, EMPTY_SUPERTYPES, name, schema, superType
-
Constructor Summary
ConstructorDescriptionCompositeTypeImpl
(CompositeType superType, String schema, String name, List<Schema> schemaList) Constructs a composite type. -
Method Summary
Modifier and TypeMethodDescriptionGets the field having the given name.Gets the composite type schema given its name.String[]
Gets the schema names of this type.Gets all the schemas (including inherited schemas) of this composite type.boolean
Checks if this composite type has the given schema.boolean
Checks if this composite type has any schema defined.boolean
Tests whether this type is a complex type.boolean
Tests whether this is a composite type.Methods inherited from class org.nuxeo.ecm.core.schema.types.ComplexTypeImpl
addField, addField, canonicalXPath, convert, getField, getFields, getFieldsCount, getNamespace, hasField, hasFields, newInstance, toString, validate
Methods inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
addConstraints, decode, encode, getConstraints, getName, getObjectResolver, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAny, isAnyType, isListType, isSimpleType, isSuperTypeOf, validateConstraints
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.core.schema.types.ComplexType
addField, getField, getFields, getFieldsCount, getNamespace, hasField, hasFields
Methods inherited from interface org.nuxeo.ecm.core.schema.types.Type
convert, decode, encode, getConstraints, getName, getObjectResolver, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isListType, isSimpleType, isSuperTypeOf, newInstance, validate
-
Field Details
-
schemas
The schemas for this composite type.
-
-
Constructor Details
-
CompositeTypeImpl
public CompositeTypeImpl(CompositeType superType, String schema, String name, List<Schema> schemaList) Constructs a composite type. Schemas must include those from the super type.
-
-
Method Details
-
hasSchemas
public boolean hasSchemas()Description copied from interface:CompositeType
Checks if this composite type has any schema defined.- Specified by:
hasSchemas
in interfaceCompositeType
- Returns:
- true if this composite type has some schemas defined, false otherwise
-
getSchema
Description copied from interface:CompositeType
Gets the composite type schema given its name.- Specified by:
getSchema
in interfaceCompositeType
- Parameters:
name
- the schema name- Returns:
- the schema if any or null if none was found
-
hasSchema
Description copied from interface:CompositeType
Checks if this composite type has the given schema.- Specified by:
hasSchema
in interfaceCompositeType
- Parameters:
name
- the schema name- Returns:
- true if the composite type has this schema, false otherwise
-
getSchemaNames
Description copied from interface:CompositeType
Gets the schema names of this type.- Specified by:
getSchemaNames
in interfaceCompositeType
- Returns:
- the schema names
-
getSchemas
Description copied from interface:CompositeType
Gets all the schemas (including inherited schemas) of this composite type.- Specified by:
getSchemas
in interfaceCompositeType
- Returns:
- the composite type schemas
-
getField
Description copied from interface:ComplexType
Gets the field having the given name.- Specified by:
getField
in interfaceComplexType
- Overrides:
getField
in classComplexTypeImpl
- Parameters:
name
- the name- Returns:
- the field or null if no field with that name was found
-
isComplexType
public boolean isComplexType()Description copied from interface:Type
Tests whether this type is a complex type.- Specified by:
isComplexType
in interfaceType
- Overrides:
isComplexType
in classComplexTypeImpl
- Returns:
- true if this type is a complex type, false otherwise
-
isCompositeType
public boolean isCompositeType()Description copied from interface:Type
Tests whether this is a composite type.- Specified by:
isCompositeType
in interfaceType
- Overrides:
isCompositeType
in classAbstractType
- Returns:
- true if this is a composite type, false otherwise
-