|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectproject35.mda.model.RecordModelFactory
public class RecordModelFactory
Factory responsible for creating instances of record structures that are derived from XML schema structures.
Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.
| Constructor Summary | |
|---|---|
RecordModelFactory()
|
|
| Method Summary | |
|---|---|
void |
addFactory(String recordClassTag,
RecordModel recordObject)
add a factory that produces a record model that is described by the tag recordClassTag found in the XML Schema |
void |
addListFieldFactory(String listFieldFactoryName,
ListFieldModel listFieldModelObject)
add a list field factory to the list of factories |
RecordModel |
createRecordModel(String recordClassTag)
instantiate a copy of a record model with the given name |
RecordModel |
createTopLevelRecordModel()
creates an instance of the top level record model. |
String[] |
getIdentifierFieldNames(String recordClassName)
|
ListFieldModel |
getListFieldModelForProxy(ProxyListFieldModel proxyListFieldModel)
returns a list field for a proxy list. |
String |
getModelStamp()
creates the model stamp used to mark experiment files made with the current model |
String[] |
getRecordClassNames()
|
ArrayList |
getRecordFactories()
|
ArrayList |
getRecordTypesSupportingReferencing()
|
String |
getSchemaInstance()
|
String |
getSchemaName()
|
String |
getStyleSheetStamp()
public void reset() { if (recordFactory != null) { recordFactory.recordFactoryObjects = new Hashtable(); recordFactory.listFactoryObjects = new Hashtable(); recordFactory.topLevelRecordModelClass = null; } configurationReader.setTopLevelElementName(null); } |
String |
getTargetNamespace()
Returns the target namespace of the current schema |
String |
getTopLevelRecordModelClass()
|
boolean |
isAmbiguous()
Returns whether any RecordModel in the RecordModelFactory is ambiguous or not. |
boolean |
isIdentifierField(String fieldName,
String recordClassName)
|
boolean |
modelSupportsIDField(String recordClassName)
|
void |
print(File file)
|
boolean |
recordClassRegistered(String recordClassTag)
determines whether a factory with the given tag name already exists |
void |
resolveProxyFields()
substitute proxy list fields in each factory with an appropriate list field model instance |
boolean |
schemaMatchesCurrentDataModel(String applicationSchema,
String dataFileSchema)
compares the model stamp found in experiment files with the current model and determines if they are the same. |
void |
setSchemaInstance(String schemaInstance)
|
void |
setSchemaName(String schemaName)
|
void |
setTargetNamespace(String targetNamespace)
Sets the target namespace of the current schema |
void |
setTopLevelRecordModelClass(String topLevelRecordModelClass)
sets the top level record model class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RecordModelFactory()
| Method Detail |
|---|
public boolean isIdentifierField(String fieldName,
String recordClassName)
public String[] getIdentifierFieldNames(String recordClassName)
public RecordModel createRecordModel(String recordClassTag)
recordClassTag - the name of the record model
public RecordModel createTopLevelRecordModel()
public ArrayList getRecordTypesSupportingReferencing()
public boolean modelSupportsIDField(String recordClassName)
public String getModelStamp()
public ArrayList getRecordFactories()
public String[] getRecordClassNames()
public String getStyleSheetStamp()
public String getSchemaInstance()
public String getSchemaName()
public String getTopLevelRecordModelClass()
public boolean recordClassRegistered(String recordClassTag)
recordClassTag - the tag name of the record model structure
public void print(File file)
public boolean schemaMatchesCurrentDataModel(String applicationSchema,
String dataFileSchema)
applicationSchema - the schema currently being used by Project35dataFileSchema - the model stamp that appears in an experiment file
public ListFieldModel getListFieldModelForProxy(ProxyListFieldModel proxyListFieldModel)
proxyListFieldModel - the proxy list model
public String getTargetNamespace()
public void setTargetNamespace(String targetNamespace)
targetNamespace - the desired target namespacepublic void setSchemaInstance(String schemaInstance)
public void setSchemaName(String schemaName)
public void resolveProxyFields()
public void setTopLevelRecordModelClass(String topLevelRecordModelClass)
topLevelRecordModelClass - the top level record model class
public void addFactory(String recordClassTag,
RecordModel recordObject)
recordClassTag - the tag name of the record model.recordObject - the object that will be copied whenever a
copy of "recordClassTag" is requested
public void addListFieldFactory(String listFieldFactoryName,
ListFieldModel listFieldModelObject)
listFieldFactoryName - the tag name of the list fieldlistFieldModelObject - the list field factory objectpublic boolean isAmbiguous()
<xs:element name="test">
<xs:complexType>
<xs:sequence>
<xs:element name="test1" type="xs:float" minOccurs="0"/>
<xs:element name="test1" type="xs:float" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||