|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deduced.analyzer.implementation.SchemaAnalyzerBuilder
public class SchemaAnalyzerBuilder

SchemaAnalyzer is used to analyze a schema and create lists of all the parent and child types for each collection type.
| Nested Class Summary | |
|---|---|
protected class |
SchemaAnalyzerBuilder.SchemaListener
SchemaListener |
| Field Summary | |
|---|---|
private java.util.Map<PropertyCollection<?,?>,RecursiveModelListener> |
fullSchemaMap
map of all the schema and their recursive listeners |
private static java.util.logging.Logger |
LOGGER
Logger |
private PropertyCollection |
schemaBasedLayer
the schema based layer being monitored |
private PropertyCollection<?,?> |
schemaInformation
the schema information of the schema based layer |
private PropertyCollection<?,?> |
schemaList
the schema list of the schema based layer |
private SchemaAnalyzerBuilder.SchemaListener |
schemaListener
schema listener instance |
private PropertyCollection |
typeInfoList
the type info list in the schema based layer |
private java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> |
typeToTypeInfoMap
map between the types and the type info object associated with them |
| Constructor Summary | |
|---|---|
SchemaAnalyzerBuilder(PropertyCollection<?,?> setSchemaBasedLayer)
SchemaAnalyzer Constructor |
|
| Method Summary | |
|---|---|
private void |
addAllSchemasFromList()
add All Schemas From List |
private void |
addSchema(PropertyCollection<?,?> schema)
add schema |
private void |
buildCollectionReverseList(PropertyCollection<?,?> collectionType,
PropertyCollection<?,?> currentParent)
build Collection Reverse List |
private void |
collectionNameChanged(PropertyChangeEvent<?,?> event)
a collection Name Changed. |
private void |
configureReverseDerivedMap(PropertyCollection<?,?> packageToAdd)
configure Reverse Derived Map |
private void |
configureReverseDerivedMapsOnTypesInChildPackages(PropertyCollection<?,?> packageToAdd)
configure Reverse Derived Maps On Types In the child Package |
private void |
configureReverseDerivedMapsOnTypesInPackage(PropertyCollection<?,?> packageToAdd)
configure Reverse Derived Maps On Types In Package |
private void |
createTypeInformationIfNecessary(PropertyCollection<?,?> newValue)
create Type Information If Necessary |
private void |
deleteAllUnusedTypeInformation()
delete All unused Type Information |
private void |
deleteTypeInformation(PropertyCollection<?,?> collectionType)
delete Type Information |
private void |
deleteTypeInformationIfNotUsed(PropertyCollection<?,?> currentTypeInfo)
delete Type Information If Not Used |
private PropertyCollection<?,PropertyCollection<?,?>> |
getFlatParentListFromTypeInfo(PropertyCollection<?,?> typeInfo)
get flat parent List From Type Info |
private PropertyCollection<?,PropertyCollection<?,?>> |
getReverseListFromTypeInfo(PropertyCollection<?,?> typeInfo)
get Reverse List From Type Info |
private PropertyCollection<?,?> |
getSchemaFromType(PropertyCollection<?,?> collectionType)
get the schema associated with a type |
private PropertyCollection<?,?> |
getSchemaInformation()
get Schema Information |
private PropertyCollection<?,?> |
getSchemaList()
get Schema List |
private PropertyCollection<?,?> |
getTypeInfo(PropertyCollection<?,?> type,
boolean buildIfNecessary)
get the Type Info object associated with a type |
private boolean |
isSchemaInUse(PropertyCollection<?,?> schema)
test if a schema is in use |
private boolean |
isTypeInformationUsed(PropertyCollection<?,?> currentTypeInfo)
test if a Type Information is still Used |
private boolean |
isTypeInfoUsedByChild(PropertyCollection<?,?> currentTypeInfo)
test if a type information is used by a child that is contained by a used schema |
private boolean |
isTypeUsedInSchemaList(PropertyCollection<?,?> currentType)
test if a type is used in the schema list |
private boolean |
isTypeValidForTypeInformation(PropertyCollection<?,?> collection)
test if a type requires a type information object |
private void |
linkParentAndChild(PropertyCollection<?,?> childCollection,
PropertyCollection<?,?> currentParent)
link Parent And Child types |
private void |
listChanged(PropertyChangeEvent<?,?> event)
schema List Changed |
private void |
parentListChanged(PropertyChangeEvent<?,?> event)
parent List Changed |
private void |
rebuild()
rebuild |
private void |
removeAllSchemas()
remove All Schemas |
private void |
removeAllSchemasAndTypes()
remove All Schemas and type information |
private void |
removeAllTypeInformation()
remove All Type Information |
private void |
removeSchema(PropertyCollection<?,?> schema)
remove Schema |
private void |
removeSchemaIfNotInUse(PropertyCollection<?,?> schema)
remove Schema if not in use |
private void |
removeSchemaListener(PropertyCollection<?,?> schema)
remove a Schema Listener |
private void |
resetSchemaBasedLayer()
reset Schema Based Layer |
private void |
schemaAddParentLinkIfNecessary(PropertyChangeEvent<?,?> event)
schema Add Parent Link Event |
private void |
schemaBasedLayerChanged(PropertyChangeEvent<?,?> event)
schema Based Layer Changed |
protected void |
schemaChanged(PropertyChangeEvent<?,?> event)
schema Changed |
private void |
schemaListChanged(PropertyChangeEvent<?,?> event)
schema List Changed |
private void |
schemaRemoveParentLinkIfNecessary(PropertyChangeEvent<?,?> event)
schema Remove Parent Link Event |
private void |
unlinkParentFromChild(PropertyCollection<?,?> currentChild,
PropertyCollection<?,?> currentParent)
unlink a Parent From a Child type |
private void |
updateSchemaInfo()
update Schema Info |
private void |
updateSchemaList()
update Schema List |
private void |
updateTypeInfoList()
update Type Info List |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger LOGGER
private SchemaAnalyzerBuilder.SchemaListener schemaListener
private java.util.Map<PropertyCollection<?,?>,RecursiveModelListener> fullSchemaMap
private java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> typeToTypeInfoMap
private PropertyCollection schemaBasedLayer
private PropertyCollection typeInfoList
private PropertyCollection<?,?> schemaList
private PropertyCollection<?,?> schemaInformation
| Constructor Detail |
|---|
public SchemaAnalyzerBuilder(PropertyCollection<?,?> setSchemaBasedLayer)
setSchemaBasedLayer - layer to monitor| Method Detail |
|---|
private void updateTypeInfoList()
private void updateSchemaInfo()
private PropertyCollection<?,?> getSchemaInformation()
private void rebuild()
private void updateSchemaList()
private PropertyCollection<?,?> getSchemaList()
private void addAllSchemasFromList()
private void removeAllSchemasAndTypes()
private void deleteAllUnusedTypeInformation()
private void deleteTypeInformationIfNotUsed(PropertyCollection<?,?> currentTypeInfo)
currentTypeInfo - the type info to delete if it's not in useprivate boolean isTypeInformationUsed(PropertyCollection<?,?> currentTypeInfo)
currentTypeInfo - the type information to test
private boolean isTypeUsedInSchemaList(PropertyCollection<?,?> currentType)
currentType - the type to test
private boolean isSchemaInUse(PropertyCollection<?,?> schema)
schema - the schema to test
private boolean isTypeInfoUsedByChild(PropertyCollection<?,?> currentTypeInfo)
currentTypeInfo - the type information to test
private PropertyCollection<?,?> getSchemaFromType(PropertyCollection<?,?> collectionType)
collectionType - the collection type
private void removeAllTypeInformation()
private void removeAllSchemas()
private void configureReverseDerivedMap(PropertyCollection<?,?> packageToAdd)
packageToAdd - the package to scan to configure the derived mapprivate void configureReverseDerivedMapsOnTypesInPackage(PropertyCollection<?,?> packageToAdd)
packageToAdd - the package from which to add all the typesprivate boolean isTypeValidForTypeInformation(PropertyCollection<?,?> collection)
collection - the type being verified
private void configureReverseDerivedMapsOnTypesInChildPackages(PropertyCollection<?,?> packageToAdd)
packageToAdd - the package from which to add all the child package
types
private void buildCollectionReverseList(PropertyCollection<?,?> collectionType,
PropertyCollection<?,?> currentParent)
collectionType - the type to parse and buildcurrentParent - current parent of the collection type
private void linkParentAndChild(PropertyCollection<?,?> childCollection,
PropertyCollection<?,?> currentParent)
childCollection - the child collectioncurrentParent - the parent collectionprivate PropertyCollection<?,PropertyCollection<?,?>> getReverseListFromTypeInfo(PropertyCollection<?,?> typeInfo)
typeInfo - the type information object
private PropertyCollection<?,PropertyCollection<?,?>> getFlatParentListFromTypeInfo(PropertyCollection<?,?> typeInfo)
typeInfo - the type information object
private PropertyCollection<?,?> getTypeInfo(PropertyCollection<?,?> type,
boolean buildIfNecessary)
type - the type to look forbuildIfNecessary - option to build the type information if necessary
protected void schemaChanged(PropertyChangeEvent<?,?> event)
event - the event descriptionprivate void schemaListChanged(PropertyChangeEvent<?,?> event)
event - the change eventprivate void schemaBasedLayerChanged(PropertyChangeEvent<?,?> event)
event - the change eventprivate void collectionNameChanged(PropertyChangeEvent<?,?> event)
event - the change eventprivate void resetSchemaBasedLayer()
private void listChanged(PropertyChangeEvent<?,?> event)
event - the event descriptionprivate void createTypeInformationIfNecessary(PropertyCollection<?,?> newValue)
newValue - the collection type from which to fetch the type
informationprivate void parentListChanged(PropertyChangeEvent<?,?> event)
event - the event descriptionprivate void schemaAddParentLinkIfNecessary(PropertyChangeEvent<?,?> event)
event - the event descriptionprivate void schemaRemoveParentLinkIfNecessary(PropertyChangeEvent<?,?> event)
event - the event description
private void unlinkParentFromChild(PropertyCollection<?,?> currentChild,
PropertyCollection<?,?> currentParent)
currentChild - the child type to unlinkcurrentParent - the parent type to unlinkprivate void addSchema(PropertyCollection<?,?> schema)
schema - new schema to monitorprivate void removeSchemaIfNotInUse(PropertyCollection<?,?> schema)
schema - the schema to remove if it isn't in useprivate void removeSchema(PropertyCollection<?,?> schema)
schema - the schema to removeprivate void deleteTypeInformation(PropertyCollection<?,?> collectionType)
collectionType - the type to removeprivate void removeSchemaListener(PropertyCollection<?,?> schema)
schema - the schema on which to remove the listener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||