Package org.nuxeo.ecm.core.schema.types
Class SchemaImpl
- java.lang.Object
-
- org.nuxeo.ecm.core.schema.types.AbstractType
-
- org.nuxeo.ecm.core.schema.types.ComplexTypeImpl
-
- org.nuxeo.ecm.core.schema.types.SchemaImpl
-
- All Implemented Interfaces:
Serializable
,ComplexType
,Schema
,Type
public class SchemaImpl extends ComplexTypeImpl implements Schema
The implementation of a Schema- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description boolean
isVersionWritabe
-
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
Constructors Constructor Description SchemaImpl(String name, Namespace ns)
Constructor for a schema.SchemaImpl(String name, Namespace ns, boolean isVersionWritabe)
SchemaImpl(ComplexType complexType, String name, Namespace ns, boolean isVersionWritabe)
Create a schema from a ComplexType
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Schema
getSchema()
Gets the schema defining this type.Type
getType(String typeName)
Gets a schema local type given its name.Type[]
getTypes()
Gets the types declared by this schema.boolean
isVersionWritabe()
void
registerType(Type type)
Registers a new type in that schema context.String
toString()
-
Methods inherited from class org.nuxeo.ecm.core.schema.types.ComplexTypeImpl
addField, addField, canonicalXPath, convert, getField, getField, getFields, getFieldsCount, getNamespace, hasField, hasFields, isComplexType, newInstance, validate
-
Methods inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
addConstraints, decode, encode, getConstraints, getName, getObjectResolver, getSchemaName, getSuperType, getTypeHierarchy, isAny, isAnyType, isCompositeType, 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, getField, getFields, getFieldsCount, getNamespace, hasField, hasFields
-
Methods inherited from interface org.nuxeo.ecm.core.schema.types.Type
convert, decode, encode, getConstraints, getName, getObjectResolver, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isComplexType, isCompositeType, isListType, isSimpleType, isSuperTypeOf, newInstance, validate
-
-
-
-
Field Detail
-
isVersionWritabe
public boolean isVersionWritabe
-
-
Constructor Detail
-
SchemaImpl
public SchemaImpl(String name, Namespace ns)
Constructor for a schema. Its types (fields) are then added throughregisterType(org.nuxeo.ecm.core.schema.types.Type)
.
-
SchemaImpl
public SchemaImpl(String name, Namespace ns, boolean isVersionWritabe)
-
SchemaImpl
public SchemaImpl(ComplexType complexType, String name, Namespace ns, boolean isVersionWritabe)
Create a schema from a ComplexType- Since:
- 5.7
-
-
Method Detail
-
getType
public Type getType(String typeName)
Description copied from interface:Schema
Gets a schema local type given its name.
-
getTypes
public Type[] getTypes()
Description copied from interface:Schema
Gets the types declared by this schema.
-
registerType
public void registerType(Type type)
Description copied from interface:Schema
Registers a new type in that schema context.- Specified by:
registerType
in interfaceSchema
-
toString
public String toString()
- Overrides:
toString
in classComplexTypeImpl
-
getSchema
public Schema getSchema()
Description copied from interface:Type
Gets the schema defining this type.- Specified by:
getSchema
in interfaceType
- Overrides:
getSchema
in classAbstractType
-
isVersionWritabe
public boolean isVersionWritabe()
- Specified by:
isVersionWritabe
in interfaceSchema
- Returns:
- true if the schema's fields are writable even for Version document.
-
-