|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sfm.ap210.jsdai.utils.GraphCopy
public class GraphCopy
This utility class supports the copying of a set of entities from a given SdaiModel to a new SdaiModel while selectively preserving entity connectivity information. Additionally, it provides bi-directional mapping information between the original source entities and the newly created target entities of the copy operation.
| Constructor Summary | |
|---|---|
GraphCopy(jsdai.lang.SdaiModel src,
jsdai.lang.SdaiModel dst)
Create a new GraphCopy operation that will copy entities from the src model to the dst model |
|
| Method Summary | |
|---|---|
void |
exclude(java.lang.Class<?> klass)
Exclude all source model entities of the given type (including subtypes) from the copy operation |
void |
exclude(jsdai.dictionary.EEntity_definition type)
Exclude all source model entities of the given type (including subtypes) from the copy operation |
void |
exclude(jsdai.lang.EEntity ent)
Exclude the given source model entity from the copy operation |
void |
exclude(java.lang.Iterable<jsdai.lang.EEntity> ents)
Exclude the given source model entities from the copy operation |
void |
execute()
Executes the copy operation and creates source/target mapping data |
jsdai.lang.EEntity |
findSource(jsdai.lang.EEntity target)
Get the corresponding entity from the source model for the given entity from the destination model |
jsdai.lang.EEntity |
findTarget(jsdai.lang.EEntity source)
Get the newly created entity in the destination model corresponding to the given entity from the source model |
java.util.Set<jsdai.lang.EEntity> |
getSourceEntities()
Get a listing of all entities copied from the source model |
java.util.Set<jsdai.lang.EEntity> |
getTargetEntities()
Get a listing of all entities created in the destination model by the copy operation |
boolean |
hasSource(jsdai.lang.EEntity target)
Returns true if there is a corresponding entity in the source model |
boolean |
hasTarget(jsdai.lang.EEntity source)
Returns true if there is a source to target mapping for the given entity |
void |
include(java.lang.Class<?> klass)
Include all source model entities of the given class (including subtypes) in the copy operation |
void |
include(jsdai.dictionary.EEntity_definition type)
Include all source model entities of the given entity type (including subtypes) in the copy operation |
void |
include(jsdai.lang.EEntity ent)
Include the given source model entity in the copy operation |
void |
include(java.lang.Iterable<jsdai.lang.EEntity> ents)
Include the given source model entities in the copy operation |
boolean |
isExcluded(jsdai.lang.EEntity ent)
Returns true if the given source model entity is explicitly excluded from the copy operation |
boolean |
isIncluded(jsdai.lang.EEntity ent)
Returns true if the given source model entity is included in the copy operation, i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphCopy(jsdai.lang.SdaiModel src,
jsdai.lang.SdaiModel dst)
src - the source modeldst - the destination model| Method Detail |
|---|
public void exclude(jsdai.lang.EEntity ent)
ent - the entity to excludepublic void exclude(java.lang.Iterable<jsdai.lang.EEntity> ents)
ents - the entities to excludepublic void include(jsdai.lang.EEntity ent)
ent - the entity to includepublic void include(java.lang.Iterable<jsdai.lang.EEntity> ents)
ents - the entities to include
public void include(java.lang.Class<?> klass)
throws jsdai.lang.SdaiException
klass - the class object
jsdai.lang.SdaiException
public void include(jsdai.dictionary.EEntity_definition type)
throws jsdai.lang.SdaiException
type - the type to include
jsdai.lang.SdaiException
public void exclude(jsdai.dictionary.EEntity_definition type)
throws jsdai.lang.SdaiException
type - the type to exclude
jsdai.lang.SdaiException
public void exclude(java.lang.Class<?> klass)
throws jsdai.lang.SdaiException
klass - the type to exclude
jsdai.lang.SdaiExceptionpublic jsdai.lang.EEntity findTarget(jsdai.lang.EEntity source)
source - the source model entity
public boolean hasTarget(jsdai.lang.EEntity source)
source - the source model entity
public jsdai.lang.EEntity findSource(jsdai.lang.EEntity target)
target - the destination model entity
public boolean hasSource(jsdai.lang.EEntity target)
target - the destination model eneitty
public boolean isExcluded(jsdai.lang.EEntity ent)
ent - the source model entity
public boolean isIncluded(jsdai.lang.EEntity ent)
ent - the source model entity
public java.util.Set<jsdai.lang.EEntity> getSourceEntities()
public java.util.Set<jsdai.lang.EEntity> getTargetEntities()
public void execute()
throws jsdai.lang.SdaiException
jsdai.lang.SdaiException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||