public class GenericWrapperElement extends XFTElementWrapper implements SchemaElementI
wrapped
Constructor and Description |
---|
GenericWrapperElement() |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeRoot() |
boolean |
canBeRootWithBase() |
static void |
ClearElementCache() |
boolean |
containsStatedKey() |
boolean |
equals(Object e) |
String[] |
findExtensionReferencedField(GenericWrapperElement e,
ArrayList searched,
boolean isRoot)
Returns the dot-syntax for the first reference field which references
0: foreign dot-syntax
1: local dot-syntax
the element.
|
static String[] |
FindExtensionReferenceField(GenericWrapperElement rootElement,
GenericWrapperElement foreign) |
String |
findReferencedField(GenericWrapperElement e,
ArrayList searched,
boolean allowExtension,
boolean isRoot)
Returns the dot-syntax for the first reference field which references
the element.
|
String[] |
findSchemaConnection(GenericWrapperElement foreign) |
String |
getAddin() |
ArrayList<XFTFieldWrapper> |
getAddIns()
Returns a collection of XFTFields which are not specifically defined in the schema element
but are used behind the scenes.
|
String |
getAlias()
Returns the Alias defined in the TorqueElement
|
static ArrayList<GenericWrapperElement> |
GetAllElements(boolean allowAddOns) |
Hashtable |
getAllFieldIDs()
Hashtable of all possible fieldIds (including extension fields) with (DATA,SINGLE,or MULTI) as the value
|
ArrayList<Object[]> |
getAllFieldNames()
Returns a collection of Object Arrays which specify the sql name, data type, xmlOnly values and
the GenericWrapperField for every field except multiple reference fields.
|
ArrayList |
getAllFields()
Returns all defined 'Leaf Node' Fields.
|
ArrayList |
getAllFields(boolean allowXmlOnly,
boolean allowMultiples)
Returns the collection of fields including XMLOnly fields (if allowXmlOnly) and
multi-reference fields (if allowMultiples).
|
ArrayList |
getAllFieldsWAddIns(boolean allowXmlOnly,
boolean allowMultiples)
Returns all 'leaf nodes' fields including addIn fields including
xmlOnly fields (if allowXmlOnly) and multi-references (if allowMultiples)
|
ArrayList |
getAllFieldsWXMLPath(String header) |
Hashtable |
getAllPossibleXMLFieldNames()
Returns Hashtable of all possible root xml-field names.
|
ArrayList<GenericWrapperField> |
getAllPrimaryKeys()
Gets all primary key fields including stated PKs and default PKs.
|
String |
getBaseClass() |
String |
getBasePeer() |
String |
getCompactXMLPath(String s) |
static String |
GetCompactXMLPath(String s) |
String |
getDbName()
Gets the DB name from the elements parent XFTDataModel.
|
XFTFieldWrapper |
getDefaultKey()
Get default key for this element.
|
ArrayList |
getDependencies()
ArrayList of sql-names
|
GenericWrapperField |
getDirectField(String name) |
ArrayList<GenericWrapperField> |
getDirectFields()
Get level 1 (direct child) 'leaf node' fields for this element
|
ArrayList<XFTFieldWrapper> |
getDirectFieldsNoFilter()
Get level 1 (direct child) fields for this element
|
List<String> |
getDisplayIdentifiers() |
static GenericWrapperElement |
GetElement(String name)
Gets the GenericWrapperElement with a matching name (Must have prefix, unless it is a proper name).
|
static GenericWrapperElement |
GetElement(String name,
String URI)
Gets the GenericWrapperElement with a matching name.
|
static GenericWrapperElement |
GetElement(XMLType t)
Get GenericWrapperElement with a matching XMLType
|
GenericWrapperElement |
getExtendedElement() |
ArrayList<ArrayList> |
getExtendedElements()
Returns SchemaElementI and XMLPath for each extended element
|
List<String> |
getExtendedXSITypes() |
GenericWrapperField |
getExtensionField() |
String |
getExtensionFieldName() |
XMLType |
getExtensionType()
Get the XMLType of the Element which this one extends.
|
String |
getExtensionXMLPath(GenericWrapperElement foreign) |
String |
getExtensionXMLPathName(String subElementName,
String fieldName) |
String |
getExtensionXMLPathName(String subElementName,
String fieldName,
String xmlPath) |
XFTFactoryI |
getFactory() |
GenericWrapperField |
getField(String name)
Get GenericWrapperField (of any fields inluding AddIns) where the name
matches the xmlName, sqlName, xmlType local type, or xmlType full foreign type.
|
GenericWrapperField |
getFieldBySQLName(String name)
Returns GenericWrapperField where the Field's sql name matches the submited string.
|
static GenericWrapperField |
GetFieldForXMLPath(String s)
Parses XML Dot Syntax to find field
|
String |
getFilter()
Returns the dot syntax reference to a field which is defined as a filter field (as defined using an XDAT tag in the XML Schema).
|
String |
getFilterField() |
String |
getFormattedName()
valid sql name for this element.
|
GenericWrapperElement |
getGenericXFTElement() |
static Object[] |
GetGrandColumnNameForXMLPath(String s)
Parses XML Dot Syntax to find field's select-grand name.
|
ArrayList |
getHiddenSuperiorElements()
ArrayList of GenericWrapperFields (DOES NOT CALL XFTReferenceManager)
|
ArrayList |
getHiddenSuperiorReferences()
Get XFTSuperiorReference for references that are not defined by Reference Fields in
this element.
|
String |
getIdMethod() |
String |
getJAVAName()
if the element had a defined javaName in its WebAppElement, then that is returned.
|
ArrayList |
getManyToManyReferences() |
GenericWrapperField |
getMetaDataField()
Get the XMLType of the Element which this one extends.
|
String |
getMetaDataFieldName() |
MetaFieldCollection |
getMetaFields() |
ArrayList |
getMultiReferenceFields()
Return all multi-reference fields (foreign-keys)
|
String |
getMultiViewName() |
String |
getName()
localType of the XMLType
|
GenericWrapperField |
getNonMultipleDataField(String name)
Get GenericWrapperField (of any fields inluding AddIns) where the name
matches the xmlName, sqlName, xmlType local type, or xmlType full foreign type.
|
GenericWrapperField |
getNonMultipleField(String name)
Get GenericWrapperField (of any fields inluding AddIns) where the name
matches the xmlName, sqlName, xmlType local type, or xmlType full foreign type.
|
ArrayList |
getNonMultipleFields()
Returns all non-multi-reference fields
|
SchemaElementI |
getOtherElement(String s) |
List<String> |
getPkNames()
Returns the sql names of the pk fields for this item.
|
ArrayList<SchemaElementI> |
getPossibleExtenders() |
ArrayList<Object[]> |
getPossibleParents(boolean withExtensions)
Returns a collection of Object arrays representing other data types which can be parents of this type.
|
static ArrayList |
GetPossibleValues(String xmlPath) |
String |
getProperName() |
ArrayList |
getReferencedElements()
Returns SchemaElementI and XMLPath for each referenced element
|
ArrayList<GenericWrapperField> |
getReferenceFields(boolean allowMultiples)
Return all reference fields (foreign-keys) with or without multi-references
|
ArrayList |
getReferenceFieldsWAddIns()
Return all reference fields (foreign-keys) including addIns without xmlOnly fields
or multi-reference fields.
|
ArrayList |
getReferenceFieldsWXMLDisplay(boolean allowMultiples,
boolean isRootElement)
This method is used to remove ReferenceFields which are not shown unless it is at the root level.
|
ArrayList |
getRelationFields()
Gets fields which have XFTRelations but are not references.
|
XFTReferenceI |
getRelationType(GenericWrapperElement foreign)
Finds the type of relationship between this element and the foreign element
|
ArrayList |
getRules()
Gets validation rules for each field.
|
XFTSchema |
getSchema()
parent schema
|
String |
getSchemaTargetNamespacePrefix() |
String |
getSchemaTargetNamespaceURI() |
String |
getSelectFromView(boolean allowMultiples,
boolean loadHistory)
Get SQL Select statement as SELECT * FROM view_name.
|
String |
getSequenceName() |
String |
getSingleViewName() |
Object[][] |
getSQLKeys()
\
Object[][SQLName,SQLType,&N,GenericWrapperField]
|
String |
getSQLName()
valid sql name for this element.
|
ArrayList |
getStatedPrimaryKeyFields()
Gets stated Primary Key fields (Does not insert a default key if none are found)
|
ArrayList |
getSubordinateReferences()
Finds XFTSuperiorReferences where this element is subordinate.
|
ArrayList |
getSuperiorReferences()
Finds XFTSuperiorReferences where this element is superior.
|
String |
getTableAndFieldGrandSQLForExtendedFieldSQLName(String subElementName,
String sqlName)
Gets the SQL select-grand name for the referenced field as a sub item of
this element.
|
Object[] |
getTableAndFieldGrandSQLForXMLPath(String fieldXMLPath)
Parses XML Dot Syntax to find field's select-grand name.
|
Object[] |
getTableAndFieldGrandSQLForXMLPath(String s,
String header,
String correctedXMLPath)
Parses XML Dot Syntax to find field's select-grand name.
|
String |
getTextFunctionName() |
XMLType |
getType()
The name of the element, and its schema's target namespace prefix are used to generate a XMLType which
is used to uniquely identify an element.
|
String |
getTypeCode()
Gets the value of the wrapped element's code.
|
ArrayList<GenericWrapperField> |
getUndefinedReferences()
Gets referenced items which are not specifically defined in the schema.
|
Hashtable |
getUniqueCompositeFields()
Return Unique Composite fields.
|
ArrayList |
getUniqueFields()
Returns all unique fields
|
ArrayList |
getUniqueIdentifierPrimaryKeyFields() |
static ArrayList |
GetUniqueValuesForField(String xmlPath) |
static String |
GetVerifiedXMLPath(String s)
Returns the validated dot-syntax reference.
|
static Object[] |
GetViewBasedGrandColumnNameForXMLPath(String s)
Parses XML Dot Syntax to find field's select-grand name.
|
ArrayList |
getXMLFields(Hashtable uriToPrefixMapping)
Returns name and level of all xml data fields.
|
String |
getXMLJavaNameValue()
Gets defined javaName or an empty string
|
String |
getXMLName()
Gets name property of the wrapped element.
|
String |
getXMLSqlNameValue()
Gets the defined sqlName or an empty string.
|
boolean |
hasBase() |
boolean |
hasExtendedField()
If the element is an extension of another element, then its extension is true and the
extended elements XMLType is stored in the exstensionType element.
|
int |
hashCode() |
boolean |
hasQuarantineSetting() |
boolean |
hasReferenceTo(GenericWrapperElement foreign)
returns true if this element directly references the forieign element.
|
boolean |
hasUniqueIdentifiers() |
boolean |
hasUniques() |
GenericWrapperElement |
ignoreHistory() |
boolean |
ignoreWarnings() |
void |
initializeExtendedField()
If the element is an extension of another element, then its extension is true and the
extended elements XMLType is stored in the exstensionType element.
|
boolean |
instanceOf(String xsiType) |
boolean |
isAbstract() |
boolean |
isANoChildElement()
If this element does not correspond to a unique XML node then its isANoChildElement will be true.
|
boolean |
isAutoActivate() |
boolean |
isAutoIncrement() |
boolean |
isExtended()
If the element is an extension of another element, then its extension is true and the
extended elements XMLType is stored in the exstensionType element.
|
boolean |
isExtension()
If the element is an extension of another element, then its extension is true and the
extended elements XMLType is stored in the exstensionType element.
|
boolean |
isExtensionOf(GenericWrapperElement foreign) |
boolean |
isHiddenFK(String name) |
boolean |
isMultipleReference(String s) |
static boolean |
IsMultipleReference(String s) |
boolean |
isPreLoad() |
boolean |
isQuarantine() |
boolean |
isQuarantine(boolean defaultValue) |
boolean |
isSkipSQL() |
boolean |
matchByValues() |
void |
setPreLoad(boolean preLoad) |
void |
setQuarantineSetting(boolean quarantine) |
boolean |
storeHistory()
The name of the element, and its schema's target namespace prefix are used to generate a XMLType which
is used to uniquely identify an element.
|
String |
toString() |
String[] |
translateXMLPathToTables(String s)
Translates a XML Dot Syntax name into the matching table element names (separated by periods).
|
static String[] |
TranslateXMLPathToTables(String s)
Translates a XML Dot Syntax name into the matching table element names (separated by periods).
|
boolean |
validateID(String name) |
getDirectXMLName, getFullXMLName, getLocalXMLName, getWrapped, getWrappedField, getXSIType, setWrapped
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFullXMLName
public static GenericWrapperElement GetElement(XMLType t) throws XFTInitException, ElementNotFoundException
t
- XFTInitException
ElementNotFoundException
public static GenericWrapperElement GetElement(String name, String URI) throws XFTInitException, ElementNotFoundException
name
- URI
- XFTInitException
ElementNotFoundException
public static GenericWrapperElement GetElement(String name) throws XFTInitException, ElementNotFoundException
name
- XFTInitException
ElementNotFoundException
public static ArrayList<GenericWrapperElement> GetAllElements(boolean allowAddOns) throws XFTInitException, ElementNotFoundException
public boolean containsStatedKey()
public ArrayList<XFTFieldWrapper> getAddIns() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
getAllFieldsWAddIns()
,
getDirectFields()
public String getAlias()
public boolean isSkipSQL()
public ArrayList<Object[]> getAllFieldNames() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
org.nrg.xft.schema.Wrappers.GenericWrapper.GenericWrapperElement#getPossibleFieldNames()
,
org.nrg.xft.schema.Wrappers.GenericWrapper.GenericWrapperElement#getSelectGrandFields()
,
org.nrg.xft.schema.Wrappers.GenericWrapper.GenericWrapperElement#getSelectGrandFieldsArrayList()
public Hashtable getAllFieldIDs() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public Hashtable getAllPossibleXMLFieldNames() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public ArrayList getAllFields()
public ArrayList getAllFields(boolean allowXmlOnly, boolean allowMultiples)
allowXmlOnly
- allowMultiples
- public ArrayList getAllFieldsWAddIns(boolean allowXmlOnly, boolean allowMultiples) throws ElementNotFoundException, XFTInitException
allowXmlOnly
- allowMultiples
- ElementNotFoundException
XFTInitException
public ArrayList<GenericWrapperField> getAllPrimaryKeys()
getAllPrimaryKeys
in interface SchemaElementI
public List<String> getPkNames() throws XFTInitException
XFTInitException
public String getBaseClass()
public String getBasePeer()
public String getDbName()
getDbName
in interface SchemaElementI
public XFTFieldWrapper getDefaultKey()
public GenericWrapperField getDirectField(String name) throws FieldNotFoundException, ElementNotFoundException, XFTInitException
public ArrayList<GenericWrapperField> getDirectFields()
public ArrayList<XFTFieldWrapper> getDirectFieldsNoFilter()
public GenericWrapperField getExtensionField() throws ElementNotFoundException, FieldNotFoundException, XFTInitException
public XFTFactoryI getFactory()
getFactory
in class XFTElementWrapper
public GenericWrapperField getField(String name) throws ElementNotFoundException, XFTInitException
name
- (XML name)ElementNotFoundException
XFTInitException
public boolean instanceOf(String xsiType)
public GenericWrapperField getNonMultipleDataField(String name) throws ElementNotFoundException, XFTInitException
name
- (XML name)ElementNotFoundException
XFTInitException
public GenericWrapperField getNonMultipleField(String name) throws ElementNotFoundException, XFTInitException
name
- (XML name)ElementNotFoundException
XFTInitException
public GenericWrapperField getFieldBySQLName(String name) throws ElementNotFoundException, XFTInitException, FieldNotFoundException
name
- (XML name)ElementNotFoundException
XFTInitException
FieldNotFoundException
public boolean validateID(String name) throws ElementNotFoundException, XFTInitException
public ArrayList getHiddenSuperiorReferences() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public ArrayList<Object[]> getPossibleParents(boolean withExtensions)
public ArrayList getHiddenSuperiorElements() throws ElementNotFoundException, XFTInitException, Exception
ElementNotFoundException
XFTInitException
Exception
public String getIdMethod()
public boolean isAutoIncrement() throws XFTInitException
XFTInitException
public String getJAVAName()
public ArrayList getMultiReferenceFields()
public ArrayList getNonMultipleFields() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public boolean hasReferenceTo(GenericWrapperElement foreign)
foreign
- public ArrayList<GenericWrapperField> getReferenceFields(boolean allowMultiples)
public ArrayList getReferenceFieldsWAddIns() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public ArrayList getReferenceFieldsWXMLDisplay(boolean allowMultiples, boolean isRootElement)
public ArrayList getRelationFields()
public ArrayList getRules() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public XFTSchema getSchema()
public String getSchemaTargetNamespacePrefix()
public String getSchemaTargetNamespaceURI()
public String getSelectFromView(boolean allowMultiples, boolean loadHistory) throws ElementNotFoundException, XFTInitException
allowMultiples
- ElementNotFoundException
XFTInitException
public String getMultiViewName()
public String getSingleViewName()
public String getSQLName()
getSQLName
in interface SchemaElementI
public String getFormattedName()
getFormattedName
in interface SchemaElementI
public ArrayList getStatedPrimaryKeyFields() throws XFTInitException
XFTInitException
public ArrayList getUniqueIdentifierPrimaryKeyFields() throws XFTInitException
XFTInitException
public ArrayList getSuperiorReferences() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public ArrayList getSubordinateReferences() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public ArrayList getManyToManyReferences() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public String getTableAndFieldGrandSQLForExtendedFieldSQLName(String subElementName, String sqlName) throws FieldNotFoundException, ElementNotFoundException, XFTInitException
subElementName
- sqlName
- FieldNotFoundException
ElementNotFoundException
XFTInitException
public String getExtensionXMLPathName(String subElementName, String fieldName) throws FieldNotFoundException, ElementNotFoundException, XFTInitException
public String getExtensionXMLPathName(String subElementName, String fieldName, String xmlPath) throws FieldNotFoundException, ElementNotFoundException, XFTInitException
public Object[] getTableAndFieldGrandSQLForXMLPath(String fieldXMLPath) throws ElementNotFoundException, XFTInitException, FieldNotFoundException
s
- ElementNotFoundException
XFTInitException
FieldNotFoundException
Exception
public Object[] getTableAndFieldGrandSQLForXMLPath(String s, String header, String correctedXMLPath) throws ElementNotFoundException, XFTInitException, FieldNotFoundException
s
- header
- tableName
- ElementNotFoundException
XFTInitException
FieldNotFoundException
Exception
public String getTypeCode()
public boolean isHiddenFK(String name)
public ArrayList<GenericWrapperField> getUndefinedReferences() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public Hashtable getUniqueCompositeFields()
public ArrayList getUniqueFields()
public boolean hasUniques()
public ArrayList getXMLFields(Hashtable uriToPrefixMapping)
public String getXMLJavaNameValue()
public String getXMLName()
public String getXMLSqlNameValue()
public boolean isANoChildElement()
public boolean isExtension()
public boolean isExtended()
public boolean hasExtendedField()
public void initializeExtendedField() throws XFTInitException, ElementNotFoundException
public boolean storeHistory()
public XMLType getType()
public String getName()
public ArrayList getAllFieldsWXMLPath(String header) throws XFTInitException, ElementNotFoundException
header
- XFTInitException
ElementNotFoundException
public static Object[] GetViewBasedGrandColumnNameForXMLPath(String s) throws XFTInitException, ElementNotFoundException, Exception
s
- XFTInitException
ElementNotFoundException
Exception
public static Object[] GetGrandColumnNameForXMLPath(String s) throws XFTInitException, ElementNotFoundException, Exception
s
- XFTInitException
ElementNotFoundException
Exception
public static String GetVerifiedXMLPath(String s) throws XFTInitException, ElementNotFoundException, Exception
s
- XFTInitException
ElementNotFoundException
Exception
public static GenericWrapperField GetFieldForXMLPath(String s) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
s
- XFTInitException
ElementNotFoundException
Exception
FieldNotFoundException
public XFTReferenceI getRelationType(GenericWrapperElement foreign) throws XFTInitException, ElementNotFoundException
foreign
- XFTReferenceIXFTInitException
ElementNotFoundException
public String getAddin()
public ArrayList getDependencies() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public String getSequenceName() throws XFTInitException, ElementNotFoundException
public MetaFieldCollection getMetaFields()
public static ArrayList GetUniqueValuesForField(String xmlPath) throws Exception
Exception
public static ArrayList GetPossibleValues(String xmlPath) throws Exception
Exception
public static String[] TranslateXMLPathToTables(String s) throws FieldNotFoundException
s
- Exception
FieldNotFoundException
public XMLType getExtensionType()
public String getExtensionFieldName()
public GenericWrapperField getMetaDataField()
public String getMetaDataFieldName()
public boolean matchByValues()
public String[] translateXMLPathToTables(String s) throws XFTInitException, ElementNotFoundException, FieldNotFoundException
s
- Exception
XFTInitException
ElementNotFoundException
FieldNotFoundException
public String findReferencedField(GenericWrapperElement e, ArrayList searched, boolean allowExtension, boolean isRoot)
e
- public String[] findExtensionReferencedField(GenericWrapperElement e, ArrayList searched, boolean isRoot)
e
- public String getFilter()
public String getFilterField()
public static boolean IsMultipleReference(String s)
public static String[] FindExtensionReferenceField(GenericWrapperElement rootElement, GenericWrapperElement foreign)
public boolean hasUniqueIdentifiers()
public boolean ignoreWarnings()
public boolean isQuarantine()
public boolean isQuarantine(boolean defaultValue)
public boolean hasQuarantineSetting()
public boolean isAutoActivate()
public void setQuarantineSetting(boolean quarantine)
quarantine
- The quarantine to set.public boolean isPreLoad()
isPreLoad
in interface SchemaElementI
public void setPreLoad(boolean preLoad)
setPreLoad
in interface SchemaElementI
preLoad
- The preLoad to set.public GenericWrapperElement getGenericXFTElement()
getGenericXFTElement
in interface SchemaElementI
public String[] findSchemaConnection(GenericWrapperElement foreign)
public ArrayList getReferencedElements()
public ArrayList<ArrayList> getExtendedElements()
public GenericWrapperElement getExtendedElement() throws XFTInitException, ElementNotFoundException
public String getProperName()
public static void ClearElementCache()
public SchemaElementI getOtherElement(String s)
getOtherElement
in interface SchemaElementI
public boolean canBeRootWithBase()
public boolean canBeRoot()
public boolean hasBase()
public Object[][] getSQLKeys()
public ArrayList<SchemaElementI> getPossibleExtenders()
public boolean isExtensionOf(GenericWrapperElement foreign)
public String getExtensionXMLPath(GenericWrapperElement foreign)
public boolean isAbstract()
public String getTextFunctionName()
public GenericWrapperElement ignoreHistory() throws XFTInitException, ElementNotFoundException
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.