public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
notNull(Object... values)
Checks that one or more values are not
null. |
static org.gcube.data.tm.stubs.AnyHolder |
toAnyHolder(org.gcube.data.trees.data.Tree t)
Transforms a
Tree into a AnyHolder accepted by the service. |
static Element |
toElement(org.gcube.data.tm.stubs.AnyHolder d)
Converts an
AnyHolder into an Element. |
static org.gcube.data.tm.stubs.AnyHolder |
toHolder(Element e)
Converts an
Element into a AnyHolder accepted by the service. |
static org.gcube.data.tm.stubs.AnyHolder |
toHolder(org.gcube.data.trees.data.Node n)
Transforms a
Node into a AnyHolder accepted by the service. |
static org.gcube.data.tm.stubs.AnyHolder |
toHolder(org.gcube.data.trees.patterns.Pattern p)
Converts a
Pattern into an AnyHolder accepted by the service. |
static org.gcube.data.trees.patterns.Pattern |
toPattern(org.gcube.data.tm.stubs.AnyHolder h)
Converts a
AnyHolder returned by the service into a Pattern. |
static org.gcube.data.trees.data.Tree |
toTree(org.gcube.data.tm.stubs.AnyHolder h)
Converts an
AnyHolder into an Element. |
public static void notNull(Object... values) throws IllegalArgumentException
null.values - the valuesIllegalArgumentException - if any of the input values is nullpublic static org.gcube.data.tm.stubs.AnyHolder toHolder(org.gcube.data.trees.patterns.Pattern p)
Pattern into an AnyHolder accepted by the service.p - the patternpublic static org.gcube.data.trees.patterns.Pattern toPattern(org.gcube.data.tm.stubs.AnyHolder h)
throws Exception
AnyHolder returned by the service into a Pattern.h - the holderException - if the conversion failspublic static org.gcube.data.tm.stubs.AnyHolder toAnyHolder(org.gcube.data.trees.data.Tree t)
Tree into a AnyHolder accepted by the service.t - the treeException - if the conversion failspublic static org.gcube.data.tm.stubs.AnyHolder toHolder(Element e)
Element into a AnyHolder accepted by the service.e - the elementpublic static org.gcube.data.tm.stubs.AnyHolder toHolder(org.gcube.data.trees.data.Node n)
throws Exception
Node into a AnyHolder accepted by the service.n - the nodeException - if the conversion failspublic static Element toElement(org.gcube.data.tm.stubs.AnyHolder d)
AnyHolder into an Element.d - the holderCopyright © 2014. All Rights Reserved.