|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object project35.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(java.lang.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(java.lang.String listFieldFactoryName,
ListFieldModel listFieldModelObject)
add a list field factory to the list of factories |
RecordModel |
createRecordModel(java.lang.String recordClassTag)
instantiate a copy of a record model with the given name |
RecordModel |
createTopLevelRecordModel()
creates an instance of the top level record model. |
java.lang.String[] |
getIdentifierFieldNames(java.lang.String recordClassName)
|
ListFieldModel |
getListFieldModelForProxy(ProxyListFieldModel proxyListFieldModel)
returns a list field for a proxy list. |
java.lang.String |
getModelStamp()
creates the model stamp used to mark experiment files made with the current model |
java.lang.String[] |
getRecordClassNames()
|
java.util.ArrayList |
getRecordFactories()
|
java.util.ArrayList |
getRecordTypesSupportingReferencing()
|
java.lang.String |
getSchemaInstance()
|
java.lang.String |
getSchemaName()
|
java.lang.String |
getStyleSheetStamp()
public void reset() { if (recordFactory != null) { recordFactory.recordFactoryObjects = new Hashtable(); recordFactory.listFactoryObjects = new Hashtable(); recordFactory.topLevelRecordModelClass = null; } configurationReader.setTopLevelElementName(null); } |
java.lang.String |
getTargetNamespace()
Returns the target namespace of the current schema |
java.lang.String |
getTopLevelRecordModelClass()
|
boolean |
isAmbiguous()
Returns whether any RecordModel in the RecordModelFactory is ambiguous or not. |
boolean |
isIdentifierField(java.lang.String fieldName,
java.lang.String recordClassName)
|
boolean |
modelSupportsIDField(java.lang.String recordClassName)
|
void |
print(java.io.File file)
|
boolean |
recordClassRegistered(java.lang.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(java.lang.String applicationSchema,
java.lang.String dataFileSchema)
compares the model stamp found in experiment files with the current model and determines if they are the same. |
void |
setSchemaInstance(java.lang.String schemaInstance)
|
void |
setSchemaName(java.lang.String schemaName)
|
void |
setTargetNamespace(java.lang.String targetNamespace)
Sets the target namespace of the current schema |
void |
setTopLevelRecordModelClass(java.lang.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(java.lang.String fieldName, java.lang.String recordClassName)
public java.lang.String[] getIdentifierFieldNames(java.lang.String recordClassName)
public RecordModel createRecordModel(java.lang.String recordClassTag)
recordClassTag
- the name of the record model
public RecordModel createTopLevelRecordModel()
public java.util.ArrayList getRecordTypesSupportingReferencing()
public boolean modelSupportsIDField(java.lang.String recordClassName)
public java.lang.String getModelStamp()
public java.util.ArrayList getRecordFactories()
public java.lang.String[] getRecordClassNames()
public java.lang.String getStyleSheetStamp()
public java.lang.String getSchemaInstance()
public java.lang.String getSchemaName()
public java.lang.String getTopLevelRecordModelClass()
public boolean recordClassRegistered(java.lang.String recordClassTag)
recordClassTag
- the tag name of the record model structure
public void print(java.io.File file)
public boolean schemaMatchesCurrentDataModel(java.lang.String applicationSchema, java.lang.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 java.lang.String getTargetNamespace()
public void setTargetNamespace(java.lang.String targetNamespace)
targetNamespace
- the desired target namespacepublic void setSchemaInstance(java.lang.String schemaInstance)
public void setSchemaName(java.lang.String schemaName)
public void resolveProxyFields()
public void setTopLevelRecordModelClass(java.lang.String topLevelRecordModelClass)
topLevelRecordModelClass
- the top level record model classpublic void addFactory(java.lang.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 requestedpublic void addListFieldFactory(java.lang.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 |