001/* 002 * Copyright (c) 2006-2012 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Bogdan Stefanescu 011 * Florent Guillaume 012 */ 013package org.nuxeo.ecm.core.schema.types; 014 015/** 016 * A marker interface for schemas. 017 * <p> 018 * A schema is a complex type that can be used used to create composite types - such as document types. 019 * <p> 020 * Schemas have no super types and must not be used as field types. 021 */ 022public interface Schema extends ComplexType { 023 024 /** 025 * Gets the types declared by this schema. 026 */ 027 Type[] getTypes(); 028 029 /** 030 * Gets a schema local type given its name. 031 * 032 * @param typeName 033 * @return the type or null if no such type 034 */ 035 Type getType(String typeName); 036 037 /** 038 * Registers a new type in that schema context. 039 * 040 * @param type 041 */ 042 void registerType(Type type); 043 044}