1 /* 2 * $Id: MetaDataProvider.java,v 1.4 2004/12/17 14:41:52 kleopatra Exp $ 3 * 4 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle, 5 * Santa Clara, California 95054, U.S.A. All rights reserved. 6 */ 7 package org.jdesktop.swing.data; 8 9 /** 10 * Interface for marking objects which can return MetaData instances for 11 * data objects. 12 * 13 * @author Jeanette Winzenburg 14 * @author Amy Fowler 15 * @version 1.0 16 */ 17 public interface MetaDataProvider { 18 19 /** 20 * Note: if the type for id is changed to Object type this will 21 * have to change to returning Object[]. 22 * 23 * @return array containing the names of all data fields in this map 24 */ 25 String[] getFieldNames(); 26 27 /** 28 * 29 * @return integer containing the number of contained MetaData 30 */ 31 32 int getFieldCount(); 33 34 /** 35 * Note: String will likely be converted to type Object for the ID 36 * @param dataID String containing the id of the data object 37 * @return MetaData object which describes properties, edit constraints 38 * and validation logic for a data object 39 */ 40 MetaData getMetaData(String dataID); 41 42 /** 43 * convenience to return all MetaData. 44 * 45 * @return 46 */ 47 MetaData[] getMetaData(); 48 49 50 }