Class InfrastructureLayerImpl

    • Field Detail

      • id

        protected long id
        unique id for this infrastructure layer
      • xmlId

        protected String xmlId
        xml id for this infrastructure layer
      • externalId

        protected String externalId
        external id for this infrastructure layer (if any)
      • supportedModes

        protected final Map<Long,​Mode> supportedModes
        the modes supported by this layer
    • Constructor Detail

      • InfrastructureLayerImpl

        public InfrastructureLayerImpl​(IdGroupingToken tokenId)
        Constructor
        Parameters:
        tokenId - to generate id for this instance for
    • Method Detail

      • generateId

        protected static long generateId​(IdGroupingToken tokenId)
        generate unique node id
        Parameters:
        tokenId - contiguous id generation within this group for instances of this class
        Returns:
        nodeId
      • setId

        protected void setId​(Long id)
        Set id on vertex
        Parameters:
        id - to set
      • registerSupportedMode

        public boolean registerSupportedMode​(Mode supportedMode)
        register a mode as supported by this layer
        Specified by:
        registerSupportedMode in interface InfrastructureLayer
        Parameters:
        supportedMode - to support
        Returns:
        true when successful false otherwise
      • registerSupportedModes

        public boolean registerSupportedModes​(Collection<Mode> supportedModes)
        register modes as supported by this layer
        Specified by:
        registerSupportedModes in interface InfrastructureLayer
        Parameters:
        supportedModes - to support
        Returns:
        true when successful false otherwise
      • getId

        public long getId()
        collect id of the entity
        Specified by:
        getId in interface Idable
        Returns:
        id
      • setExternalId

        public void setExternalId​(String externalId)
        set the external id
        Specified by:
        setExternalId in interface ExternalIdable
        Parameters:
        externalId - to set
      • getXmlId

        public String getXmlId()
        the id exposed to users as the "normal" id in the PLANit native xml format
        Specified by:
        getXmlId in interface ExternalIdable
        Returns:
        xmlId
      • setXmlId

        public void setXmlId​(String xmlId)
        set the external id
        Specified by:
        setXmlId in interface ExternalIdable
        Parameters:
        xmlId - to set
      • getSupportedModes

        public final Collection<Mode> getSupportedModes()
        collect the modes supported by this infrastructure layer
        Specified by:
        getSupportedModes in interface InfrastructureLayer
        Returns:
        the supported modes for at least some part of the available infrastructure