Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.schema.types
Interface CompositeType

All Superinterfaces:
ComplexType, Serializable, Type, ValueConverter
All Known Subinterfaces:
DocumentType
All Known Implementing Classes:
CompositeTypeImpl, DocumentTypeImpl

public interface CompositeType
extends ComplexType

A composite type is an aggregation of several schemas.

Each schema defines its own namespace to avoid field name collisions.

Author:
Bogdan Stefanescu

Field Summary
 
Fields inherited from interface org.nuxeo.ecm.core.schema.types.Type
ANY
 
Method Summary
 void addSchema(Schema schema)
          Adds a schema.
 void addSchema(String schema)
          Adds a schema.
 TypeRef<? extends CompositeType> getRef()
          Gets a proxy (or reference to this type).
 Schema getSchema(String name)
          Gets the composite type schema given its name.
 Schema getSchemaByPrefix(String prefix)
          Finds the composite type schema given the schema prefix.
 String[] getSchemaNames()
          Gets the schema names of this type.
 Collection<Schema> getSchemas()
          Gets all the schemas (including inherited schemas) of this composite type.
 boolean hasSchema(String name)
          Checks if this composite type has the given schema.
 boolean hasSchemas()
          Checks if this composite type has any schema defined.
 
Methods inherited from interface org.nuxeo.ecm.core.schema.types.ComplexType
addField, addField, addField, addField, getField, getField, getFields, getFieldsCount, getNamespace, hasField, hasField, hasFields, isUnstructured
 
Methods inherited from interface org.nuxeo.ecm.core.schema.types.Type
decode, encode, getHelper, getName, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isComplexType, isCompositeType, isListType, isNotNull, isReadOnly, isSimpleType, isSuperTypeOf, newInstance, validate
 
Methods inherited from interface org.nuxeo.ecm.core.schema.types.ValueConverter
convert
 

Method Detail

addSchema

void addSchema(String schema)
Adds a schema.

Parameters:
schema - the schema name to add

addSchema

void addSchema(Schema schema)
Adds a schema.

Parameters:
schema - the schema to add

getSchema

Schema getSchema(String name)
Gets the composite type schema given its name.

Parameters:
name - the schema name
Returns:
the schema if any or null if none was found

getSchemaByPrefix

Schema getSchemaByPrefix(String prefix)
Finds the composite type schema given the schema prefix.

Parameters:
prefix - the schema prefix
Returns:
the schema if any or null if none was found

hasSchemas

boolean hasSchemas()
Checks if this composite type has any schema defined.

Returns:
true if this composite type has some schemas defined, false otherwise

hasSchema

boolean hasSchema(String name)
Checks if this composite type has the given schema.

Parameters:
name - the schema name
Returns:
true if the composite type has this schema, false otherwise

getSchemaNames

String[] getSchemaNames()
Gets the schema names of this type.

Returns:
the schema names

getSchemas

Collection<Schema> getSchemas()
Gets all the schemas (including inherited schemas) of this composite type.

Returns:
the composite type schemas

getRef

TypeRef<? extends CompositeType> getRef()
Description copied from interface: Type
Gets a proxy (or reference to this type).

Specified by:
getRef in interface ComplexType
Specified by:
getRef in interface Type
Returns:
a reference to the type

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.