Interface IRelationService

All Superinterfaces:
IComponent, IInitializable, IMetaComponent

public interface IRelationService extends IMetaComponent
  • Method Details

    • getRelTypeName

      String getRelTypeName(int relType) throws MetaException
      Returns a String name for the specified type identifier
      Throws:
      MetaException
    • getRelType

      int getRelType(String relation)
      Returns the ThingID for the specified relation name.
    • registerRelType

      int registerRelType(String name) throws MetaException
      creates a new relation type
      Throws:
      MetaException
    • unregisterRelType

      void unregisterRelType(int relType) throws MetaException
      Unregisters a Thing type. This will delete all relationships based on this ID
      Throws:
      MetaException
    • getRelationIDFromRelType

      IThingID getRelationIDFromRelType(int reltype)
      converts the relation ID into a full thingID
    • getRelTypes

      int[] getRelTypes() throws MetaException
      Get a List of all IRelation types.
      Throws:
      MetaException
    • getRelatedData

      IRelatedData getRelatedData(IThingID thingID)
      get a related data object
    • invalidate

      void invalidate()
      causes relation lookup to be refreshed
    • relate

      void relate(IThingID fromID, IThingID toID, int relType) throws MetaException
      adds a specific relation to the fromID
      Throws:
      MetaException
    • unrelate

      void unrelate(IThingID fromID, IThingID toID, int relType) throws MetaException
      removes relations to current thing
      Parameters:
      fromID - thing you are interested in
      toID - if null remove all of this type
      relType - if 0 remove all toID
      Throws:
      MetaException
    • getRelatedIDs

      IThingIDList getRelatedIDs(IThingID fromID, int relType, int startIndex, int endIndex) throws MetaException
      Parameters:
      relType - get all related of this type, 0 means all
      Throws:
      MetaException
    • getContainerIDs

      IThingIDList getContainerIDs(IThingID fromID, int relType, int startIndex, int endIndex) throws MetaException
      Returns list of thing IDs which are containers for the specified thing using relType
      Throws:
      MetaException