public interface IRelationService extends IMetaComponent
Modifier and Type | Method and Description |
---|---|
IThingIDList |
getContainerIDs(IThingID fromID,
int relType,
int startIndex,
int endIndex)
Returns list of thing IDs which are containers for the specified thing using
relType
|
IRelatedData |
getRelatedData(IThingID thingID)
get a related data object
|
IThingIDList |
getRelatedIDs(IThingID fromID,
int relType,
int startIndex,
int endIndex) |
IThingID |
getRelationIDFromRelType(int reltype)
converts the relation ID into a full thingID
|
int |
getRelType(String relation)
Returns the ThingID for the specified relation name.
|
String |
getRelTypeName(int relType)
Returns a String name for the specified type identifier
|
int[] |
getRelTypes()
Get a List of all IRelation types.
|
void |
invalidate()
causes relation lookup to be refreshed
|
int |
registerRelType(String name)
creates a new relation type
|
void |
relate(IThingID fromID,
IThingID toID,
int relType)
adds a specific relation to the fromID
|
void |
unregisterRelType(int relType)
Unregisters a Thing type.
|
void |
unrelate(IThingID fromID,
IThingID toID,
int relType)
removes relations to current thing
|
getMetaContext, setMetaContext
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
String getRelTypeName(int relType) throws MetaException
MetaException
int getRelType(String relation)
int registerRelType(String name) throws MetaException
MetaException
void unregisterRelType(int relType) throws MetaException
MetaException
IThingID getRelationIDFromRelType(int reltype)
int[] getRelTypes() throws MetaException
MetaException
IRelatedData getRelatedData(IThingID thingID)
void invalidate()
void relate(IThingID fromID, IThingID toID, int relType) throws MetaException
MetaException
void unrelate(IThingID fromID, IThingID toID, int relType) throws MetaException
fromID
- thing you are interested intoID
- if null remove all of this typerelType
- if 0 remove all toIDMetaException
IThingIDList getRelatedIDs(IThingID fromID, int relType, int startIndex, int endIndex) throws MetaException
relType
- get all related of this type, 0 means allMetaException
IThingIDList getContainerIDs(IThingID fromID, int relType, int startIndex, int endIndex) throws MetaException
MetaException