Class LogicalPartitionImpl

    • Constructor Detail

      • LogicalPartitionImpl

        public LogicalPartitionImpl​(java.lang.String networkName,
                                    int partitionId,
                                    int linkLevel)
      • LogicalPartitionImpl

        protected LogicalPartitionImpl​(java.lang.String networkName,
                                       int partitionId,
                                       int linkLevel,
                                       int numInternalNodes,
                                       int numExternalNodes,
                                       int numInternalLinks,
                                       int numBoundaryLinks)
      • LogicalPartitionImpl

        protected LogicalPartitionImpl​(oracle.spatial.network.lod.LogicalSubNetworkImpl network,
                                       int partitionId)
    • Method Detail

      • getPartitionId

        public int getPartitionId()
        Description copied from interface: LogicalPartition
        Returns the partition ID of this partition.
        Specified by:
        getPartitionId in interface LogicalPartition
        Returns:
        partition ID of this partition
      • addNode

        public void addNode​(LogicalNetNode node,
                            int partitionId)
        Description copied from interface: LogicalPartition
        Adds a node to the network partition. The input partition ID can be the same as the partition ID of this network partition, in which case, the node to be added is an internal node; otherwise, the node is an external node, belong to a neighboring partition.
        Specified by:
        addNode in interface LogicalPartition
        Parameters:
        node - logical node
        partitionId - ID of the partition that the node belongs to
      • setNodePartitionId

        public void setNodePartitionId​(long nodeId,
                                       int partitionId)
        Description copied from interface: LogicalPartition
        Sets the partition the node belongs to.
        Specified by:
        setNodePartitionId in interface LogicalPartition
        Parameters:
        nodeId - node ID
        partitionId - partition ID
      • removeNode

        public void removeNode​(long nodeId)
        Description copied from interface: LogicalBasicNetwork
        Removes a node from the network.
        Specified by:
        removeNode in interface LogicalBasicNetwork
        Parameters:
        nodeId - ID of the node to be removed
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Description copied from interface: LogicalBasicNetwork
        Supports cloneable
        Specified by:
        clone in interface LogicalBasicNetwork
        Returns:
        cloned object
        Throws:
        java.lang.CloneNotSupportedException
      • getInternalNodeIds

        public long[] getInternalNodeIds()
        Description copied from interface: LogicalSubNetwork
        Returns all the internal node IDs in the sub-network.
        Specified by:
        getInternalNodeIds in interface LogicalSubNetwork
        Returns:
        array of internal node IDs
      • getInternalBoundaryNodeIds

        public long[] getInternalBoundaryNodeIds()
        Description copied from interface: LogicalSubNetwork
        Returns all the internal node IDs in the sub-network without a link to any external nodes.
        Specified by:
        getInternalBoundaryNodeIds in interface LogicalSubNetwork
        Returns:
        array of internal boundary node IDs
      • getInternalNonBoundaryNodeIds

        public long[] getInternalNonBoundaryNodeIds()
        Description copied from interface: LogicalSubNetwork
        Returns all the internal node IDs in the sub-network without a link to any external nodes.
        Specified by:
        getInternalNonBoundaryNodeIds in interface LogicalSubNetwork
        Returns:
        array of internal non-boundary node IDs
      • getExternalNodeIds

        public long[] getExternalNodeIds()
        Description copied from interface: LogicalSubNetwork
        Returns all the external node IDs in the sub-network.
        Specified by:
        getExternalNodeIds in interface LogicalSubNetwork
        Returns:
        array of external node IDs
      • isInternalNode

        public boolean isInternalNode​(long nodeId)
        Description copied from interface: LogicalSubNetwork
        Checks whether the input node is an internal node or not.
        Specified by:
        isInternalNode in interface LogicalSubNetwork
        Parameters:
        nodeId - node id
        Returns:
        true, if the input node is an internal node; false, otherwise.
      • isInternalLink

        public boolean isInternalLink​(long linkId)
        Description copied from interface: LogicalSubNetwork
        Checks whether the input link is an internal link or not.
        Specified by:
        isInternalLink in interface LogicalSubNetwork
        Parameters:
        linkId - link ID
        Returns:
        true, if the input link is an internal link; false, otherwise.
      • isIncomingLink

        public boolean isIncomingLink​(long linkId)
        Description copied from interface: LogicalSubNetwork
        Checks whether the input link is an incoming link or not.
        Specified by:
        isIncomingLink in interface LogicalSubNetwork
        Parameters:
        linkId - link ID
        Returns:
        true, if the input link is an incoming link; false, otherwise.
      • isOutgoingLink

        public boolean isOutgoingLink​(long linkId)
        Description copied from interface: LogicalSubNetwork
        Checks whether the input link is an outgoing link or not.
        Specified by:
        isOutgoingLink in interface LogicalSubNetwork
        Parameters:
        linkId - link ID
        Returns:
        true, if the input link is an outgoing link; false, otherwise.
      • getInternalLinkIds

        public long[] getInternalLinkIds()
        Description copied from interface: LogicalSubNetwork
        Returns all the internal link IDs in the sub-network.
        Specified by:
        getInternalLinkIds in interface LogicalSubNetwork
        Returns:
        array of internal link IDs.
      • getBoundaryLinkIds

        public long[] getBoundaryLinkIds()
        Description copied from interface: LogicalSubNetwork
        Returns all the boundary link IDs in the sub-network.
        Specified by:
        getBoundaryLinkIds in interface LogicalSubNetwork
        Returns:
        array of boundary link IDs.
      • getIncomingLinkIds

        public long[] getIncomingLinkIds()
        Description copied from interface: LogicalSubNetwork
        Returns all the incoming link IDs in the sub-network.
        Specified by:
        getIncomingLinkIds in interface LogicalSubNetwork
        Returns:
        array of incoming link IDs.
      • getOutgoingLinkIds

        public long[] getOutgoingLinkIds()
        Description copied from interface: LogicalSubNetwork
        Returns all the outgoing link IDs in the sub-network.
        Specified by:
        getOutgoingLinkIds in interface LogicalSubNetwork
        Returns:
        array of outgoing link IDs.
      • getNumberOfBoundaryLinks

        public int getNumberOfBoundaryLinks()
        Description copied from interface: LogicalSubNetwork
        Returns the number of boundary links in the sub-network, which includes both incoming links and outgoing links.
        Specified by:
        getNumberOfBoundaryLinks in interface LogicalSubNetwork
        Returns:
        number of boundary links
      • addNode

        public void addNode​(LogicalNetNode node,
                            boolean isInternal)
        Description copied from interface: LogicalSubNetwork
        Adds a logical node to the sub-network.
        Specified by:
        addNode in interface LogicalSubNetwork
        Parameters:
        node - logical node
        isInternal - set to true, if the node is an internal node; false, otherwise.
      • getInternalNodes

        protected LongHashSet getInternalNodes()
      • getName

        public java.lang.String getName()
        Description copied from interface: LogicalBasicNetwork
        Returns the internal network name, for example, the network name stored in network metadata table. Note that the internal network names for different networks are not guaranteed to be unique across multiple database connections.
        Specified by:
        getName in interface LogicalBasicNetwork
        Returns:
        network name
      • isUserDataLoaded

        public boolean isUserDataLoaded()
        Deprecated.
        Description copied from interface: LogicalBasicNetwork
        Returns whether the user data are loaded to the network.
        Specified by:
        isUserDataLoaded in interface LogicalBasicNetwork
        Returns:
        true, if the user data are loaded; false, otherwise.
      • setIsUserDataLoaded

        public void setIsUserDataLoaded​(boolean isUserDataLoaded)
        Deprecated.
        Description copied from interface: LogicalBasicNetwork
        Sets whether the user data is loaded to the network.
        Specified by:
        setIsUserDataLoaded in interface LogicalBasicNetwork
        Parameters:
        isUserDataLoaded - true, if the user data are loaded; false, otherwise.
      • addUserDataCategories

        public void addUserDataCategories​(int[] userDataCategories)
      • addUserDataCategory

        public void addUserDataCategory​(int userDataCategory)
        Description copied from interface: LogicalBasicNetwork
        Adds the user data category that have been loaded to the network.
        Specified by:
        addUserDataCategory in interface LogicalBasicNetwork
        Parameters:
        userDataCategory - user data category
      • removeLink

        public void removeLink​(long linkId)
        Description copied from interface: LogicalBasicNetwork
        Removes a link from the network.
        Specified by:
        removeLink in interface LogicalBasicNetwork
        Parameters:
        linkId - ID of the link to be removed