|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sfm.ap210.jsdai.utils.SdaiUtils
public class SdaiUtils
This class contains generic utility methods for common SDAI operations and other convenience utilities that may be helpful when dealing with the JSDAI.
| Constructor Summary | |
|---|---|
SdaiUtils()
|
|
| Method Summary | ||
|---|---|---|
static java.util.Set<jsdai.dictionary.EAttribute> |
allAttributes(jsdai.dictionary.EEntity_definition def)
Get all attributes defined for the given entity definition |
|
static java.util.Set<jsdai.dictionary.EAttribute> |
allAttributes(jsdai.lang.EEntity ent)
Get all attributes defined for the given entity |
|
static java.util.Set<jsdai.dictionary.EEntity_definition> |
allSupers(jsdai.dictionary.EEntity_definition def)
Get all super types of the given entity definition |
|
static void |
close(jsdai.lang.SdaiSession session)
Close the given SDAI session instance |
|
static
|
create(java.lang.Class<T> type,
jsdai.lang.SdaiModel model)
Create a new instance of the given type in the given model and return the newly create instance |
|
static java.lang.Iterable<jsdai.dictionary.EAttribute> |
explicitAttributes(jsdai.dictionary.EEntity_definition def)
Get all explicit attributes defined for the given entity definition |
|
static java.lang.Iterable<jsdai.dictionary.EAttribute> |
explicitAttributes(jsdai.lang.EEntity ent)
Get all explicit attributes defined for the given entity |
|
static
|
findFirst(java.lang.Class<T> klass,
jsdai.lang.Aggregate agg)
Find the first entity of the given type in the aggregate instance |
|
static
|
findFirst(java.lang.Class<T> klass,
jsdai.lang.SdaiModel model)
Find the first entity of the given type in the given SDAI model |
|
static
|
Instances(java.lang.Class<T> klass,
jsdai.lang.SdaiModel model)
Create a list view of all entities in the given model conforming to the given type restriction |
|
static java.lang.Iterable<jsdai.lang.EEntity> |
Iter(jsdai.lang.Aggregate aggregate)
Create an iterable view of all entities in the given aggregate |
|
static
|
Iter(java.lang.Class<T> klass,
jsdai.lang.Aggregate aggregate)
Create an iterable view of the given aggregate limited to instances that conform to the type given by klass |
|
static jsdai.lang.SdaiModel |
loadModel(java.io.File file,
jsdai.lang.SdaiRepository repo)
Load the Part21 STEP model contained in the given file into the given repository |
|
static jsdai.lang.SdaiRepository |
newRepo(jsdai.lang.SdaiSession session,
java.lang.String name)
Create a new repository with the given name in the given SDAI session |
|
static jsdai.lang.SdaiSession |
newROSession()
Open a new read-only SDAI session with default configuration |
|
static jsdai.lang.SdaiModel |
newRWModel(jsdai.lang.SdaiRepository repo,
java.lang.String name)
Create a new read-write enabled AP210 model in the given repository with the given name |
|
static jsdai.lang.SdaiSession |
newRWSession()
Open a new read-write SDAI session with default configuration |
|
static java.util.List<jsdai.lang.EEntity> |
Sequence(jsdai.lang.AEntity aggregate)
Create a list view of all entities in the given aggregate |
|
static
|
Sequence(java.lang.Class<T> klass,
jsdai.lang.Aggregate aggregate)
Create a list view of the given aggregate limited to instances that conform to the type given by klass |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SdaiUtils()
| Method Detail |
|---|
public static jsdai.lang.SdaiSession newRWSession()
throws jsdai.lang.SdaiException
jsdai.lang.SdaiException
public static jsdai.lang.SdaiSession newROSession()
throws jsdai.lang.SdaiException
jsdai.lang.SdaiException
public static jsdai.lang.SdaiModel newRWModel(jsdai.lang.SdaiRepository repo,
java.lang.String name)
throws jsdai.lang.SdaiException
repo - name -
jsdai.lang.SdaiException
public static jsdai.lang.SdaiRepository newRepo(jsdai.lang.SdaiSession session,
java.lang.String name)
throws jsdai.lang.SdaiException
session - name -
jsdai.lang.SdaiException
public static jsdai.lang.SdaiModel loadModel(java.io.File file,
jsdai.lang.SdaiRepository repo)
throws jsdai.lang.SdaiException
file - repo -
jsdai.lang.SdaiException
public static <T> java.lang.Iterable<T> Iter(java.lang.Class<T> klass,
jsdai.lang.Aggregate aggregate)
throws jsdai.lang.SdaiException
T - klass - the type restriction of returned aggregate itemsaggregate - the aggregate instance
jsdai.lang.SdaiException
public static <T> java.util.List<T> Sequence(java.lang.Class<T> klass,
jsdai.lang.Aggregate aggregate)
throws jsdai.lang.SdaiException
T - klass - the type restriction of returned aggregate itemsaggregate - the aggregate instance
jsdai.lang.SdaiException
public static java.lang.Iterable<jsdai.lang.EEntity> Iter(jsdai.lang.Aggregate aggregate)
throws jsdai.lang.SdaiException
aggregate -
jsdai.lang.SdaiException
public static java.util.List<jsdai.lang.EEntity> Sequence(jsdai.lang.AEntity aggregate)
throws jsdai.lang.SdaiException
aggregate -
jsdai.lang.SdaiException
public static <T> java.util.List<T> Instances(java.lang.Class<T> klass,
jsdai.lang.SdaiModel model)
throws jsdai.lang.SdaiException
T - the EEntity type restrictionklass - the type to filter formodel - the SDAI model instance to search
jsdai.lang.SdaiException
public static void close(jsdai.lang.SdaiSession session)
throws jsdai.lang.SdaiException
session -
jsdai.lang.SdaiException
public static <T> T create(java.lang.Class<T> type,
jsdai.lang.SdaiModel model)
throws jsdai.lang.SdaiException
T - the entity type to create in the modeltype - the class object of the entity type to createmodel - the model instance
jsdai.lang.SdaiException
public static java.util.Set<jsdai.dictionary.EEntity_definition> allSupers(jsdai.dictionary.EEntity_definition def)
throws jsdai.lang.SdaiException
def -
jsdai.lang.SdaiException
public static java.lang.Iterable<jsdai.dictionary.EAttribute> explicitAttributes(jsdai.dictionary.EEntity_definition def)
throws jsdai.lang.SdaiException
def -
jsdai.lang.SdaiException
public static java.lang.Iterable<jsdai.dictionary.EAttribute> explicitAttributes(jsdai.lang.EEntity ent)
throws jsdai.lang.SdaiException
ent -
jsdai.lang.SdaiException
public static java.util.Set<jsdai.dictionary.EAttribute> allAttributes(jsdai.dictionary.EEntity_definition def)
throws jsdai.lang.SdaiException
def -
jsdai.lang.SdaiException
public static java.util.Set<jsdai.dictionary.EAttribute> allAttributes(jsdai.lang.EEntity ent)
throws jsdai.lang.SdaiException
ent -
jsdai.lang.SdaiException
public static <T> T findFirst(java.lang.Class<T> klass,
jsdai.lang.Aggregate agg)
throws jsdai.lang.SdaiException
T - the type of entity to findklass - the class object of the entity's typeagg - the aggregate to search
jsdai.lang.SdaiException
public static <T> T findFirst(java.lang.Class<T> klass,
jsdai.lang.SdaiModel model)
throws jsdai.lang.SdaiException
T - the type of entity to findklass - the class object of the entity's typemodel - the model to search
jsdai.lang.SdaiException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||