public class NodelistUtil extends Object
| Constructor and Description |
|---|
NodelistUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Node |
findNode(NodeList nodeList,
NodeReference nodeRef)
Returns the first node with identifier of the provided node reference
|
static Map<String,String> |
mapNodeList(InputStream nodeListStream)
Convenience method of transferring nodeId and nodeBaseURL into a Map
|
static Map<String,String> |
mapNodeList(NodeList nodeList)
Convenience method of transferring nodeId and nodeBaseURL into a Map
|
static Set<Node> |
selectNode(NodeList nodeList,
Subject subject)
Finds the nodes in the NodeList that contain the provided Subject.
|
static Set<Node> |
selectNodes(NodeList nodeList,
NodeState nodeState)
Finds the nodes in the NodeList that are in the provided state.
|
static Set<Node> |
selectNodes(NodeList nodeList,
NodeType nodeType)
Finds the nodes in the NodeList that match the provided NodeType.
|
static Set<Node> |
selectNodesByService(NodeList nodeList,
String serviceName,
String version,
boolean isAvailable)
Finds the nodes in the NodeList that contain services that match the
provided serviceName and availability.
|
public static Map<String,String> mapNodeList(InputStream nodeListStream) throws InstantiationException, IllegalAccessException, org.jibx.runtime.JiBXException, IOException
nodeListStream - InstantiationExceptionIOExceptionIllegalAccessExceptionorg.jibx.runtime.JiBXExceptionpublic static Map<String,String> mapNodeList(NodeList nodeList)
nodeList - InstantiationExceptionIOExceptionIllegalAccessExceptionorg.jibx.runtime.JiBXExceptionpublic static Node findNode(NodeList nodeList, NodeReference nodeRef)
nodeList - - the nodeList to be searchednodeRef - - the node reference for the node of interestpublic static Set<Node> selectNode(NodeList nodeList, Subject subject)
nodeList - - the nodeList to be searchednodeRef - - the node reference for the node of interestpublic static Set<Node> selectNodes(NodeList nodeList, NodeType nodeType)
nodeList - - the dataONE NodeList to search in for matching nodesnodeType - - if null, returns all nodes, otherwisepublic static Set<Node> selectNodes(NodeList nodeList, NodeState nodeState)
nodeList - - the dataONE NodeList to search in for matching nodesnodeState - - if null, returns all nodes, otherwisepublic static Set<Node> selectNodesByService(NodeList nodeList, String serviceName, String version, boolean isAvailable)
nodeList - - the dataONE NodeList to search in for matching nodesserviceName - - the name of the service to find, case-insensitiveversion - - the name of the version to find, case-insensitive. If null, criteria is ignoredisAvailable - - if true, will return only nodes where available value is true or null
- if false, will return only nodes where available value is falseCopyright © 2014. All Rights Reserved.