public class Utils extends Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static void |
copyfile(File f1,
File f2) |
static void |
copyfileToFolder(File file,
File outFolder,
String fileName) |
static <T extends TransferOutcome> |
getFileOutcomes(String outcomeRSURI) |
static org.gcube.data.trees.patterns.Pattern |
getPattern(Types.AnyHolder h)
Converts a
Types.AnyHolder returned by the service into a Pattern . |
static <T extends TransferOutcome> |
getTreeOutcomes(String outcomeRSURI) |
static <E extends org.gcube.common.core.faults.GCUBEFault> |
newFault(E fault,
Throwable cause)
Returns a given fault after serialising into it an original cause.
|
static Types.AnyHolder |
toHolder(Element e) |
static Types.AnyHolder |
toHolder(org.gcube.data.trees.data.Node n)
Transforms a
Node into a Types.AnyHolder accepted by the service. |
static Types.AnyHolder |
toHolder(org.gcube.data.trees.patterns.Pattern p) |
public static org.gcube.data.trees.patterns.Pattern getPattern(Types.AnyHolder h) throws Exception
Types.AnyHolder
returned by the service into a Pattern
.h
- the holderException
- if the conversion failspublic static Types.AnyHolder toHolder(org.gcube.data.trees.patterns.Pattern p) throws Exception
Exception
public static Types.AnyHolder toHolder(Element e)
public static Types.AnyHolder toHolder(org.gcube.data.trees.data.Node n) throws Exception
Node
into a Types.AnyHolder
accepted by the service.n
- the nodeException
- if the conversion failspublic static void copyfile(File f1, File f2) throws IOException
IOException
public static <E extends org.gcube.common.core.faults.GCUBEFault> E newFault(E fault, Throwable cause)
E
- the type of the faultfault
- the faultcause
- the causepublic static void copyfileToFolder(File file, File outFolder, String fileName) throws IOException
IOException
public static <T extends TransferOutcome> ArrayList<T> getFileOutcomes(String outcomeRSURI) throws Exception
Exception
public static <T extends TransferOutcome> ArrayList<T> getTreeOutcomes(String outcomeRSURI) throws Exception
Exception
Copyright © 2015. All Rights Reserved.