1 /* 2 * Copyright (C) 2005 Alfresco, Inc. 3 * 4 * Licensed under the Mozilla Public License version 1.1 5 * with a permitted attribution clause. You may obtain a 6 * copy of the License at 7 * 8 * http://www.alfresco.org/legal/license.txt 9 * 10 * Unless required by applicable law or agreed to in writing, 11 * software distributed under the License is distributed on an 12 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 13 * either express or implied. See the License for the specific 14 * language governing permissions and limitations under the 15 * License. 16 */ 17 package org.alfresco.repo.dictionary; 18 19 import org.alfresco.service.cmr.dictionary.AspectDefinition; 20 import org.alfresco.service.cmr.dictionary.AssociationDefinition; 21 import org.alfresco.service.cmr.dictionary.ClassDefinition; 22 import org.alfresco.service.cmr.dictionary.DataTypeDefinition; 23 import org.alfresco.service.cmr.dictionary.PropertyDefinition; 24 import org.alfresco.service.cmr.dictionary.TypeDefinition; 25 import org.alfresco.service.namespace.QName; 26 27 28 /** 29 * Access to model items. 30 * 31 * @author David Caruana 32 * 33 */ 34 /*package*/ interface ModelQuery 35 { 36 /** 37 * Gets the specified data type 38 * 39 * @param name name of the data type 40 * @return data type definition 41 */ 42 public DataTypeDefinition getDataType(QName name); 43 44 /** 45 * Gets the data type for the specified Java Class 46 * 47 * @param javaClass the java class 48 * @return the data type definition (or null, if mapping is not available) 49 */ 50 public DataTypeDefinition getDataType(Class javaClass); 51 52 /** 53 * Gets the specified type 54 * 55 * @param name name of the type 56 * @return type definition 57 */ 58 public TypeDefinition getType(QName name); 59 60 /** 61 * Gets the specified aspect 62 * 63 * @param name name of the aspect 64 * @return aspect definition 65 */ 66 public AspectDefinition getAspect(QName name); 67 68 /** 69 * Gets the specified class 70 * 71 * @param name name of the class 72 * @return class definition 73 */ 74 public ClassDefinition getClass(QName name); 75 76 /** 77 * Gets the specified property 78 * 79 * @param name name of the property 80 * @return property definition 81 */ 82 public PropertyDefinition getProperty(QName name); 83 84 /** 85 * Gets the specified association 86 * 87 * @param name name of the association 88 * @return association definition 89 */ 90 public AssociationDefinition getAssociation(QName name); 91 92 } 93