use of com.microsoft.applicationinsights.smoketest.schemav2.Data in project geotoolkit by Geomatys.
the class HTMLAdaptor method toWPS2Input.
@Override
public DataInput toWPS2Input(String candidate) throws UnconvertibleObjectException {
final ComplexData cdt = new ComplexData();
cdt.getContent().add(new org.geotoolkit.wps.xml.v200.Format(encoding, mimeType, schema, null));
cdt.getContent().add(candidate);
final Data data = new Data();
data.getContent().add(cdt);
final DataInput dit = new DataInput();
dit.setData(data);
return dit;
}
use of com.microsoft.applicationinsights.smoketest.schemav2.Data in project geotoolkit by Geomatys.
the class JSONAdaptor method toWPS2Input.
@Override
public DataInput toWPS2Input(TreeNode candidate) throws UnconvertibleObjectException {
if (candidate instanceof ReferenceProxy)
return super.toWPS2Input(candidate);
final ComplexData cdt = new ComplexData();
cdt.getContent().add(new org.geotoolkit.wps.xml.v200.Format(encoding, mimeType, schema, null));
cdt.getContent().add(candidate);
final Data data = new Data();
data.getContent().add(cdt);
final DataInput dit = new DataInput();
dit.setData(data);
return dit;
}
use of com.microsoft.applicationinsights.smoketest.schemav2.Data in project geotoolkit by Geomatys.
the class KMLAdaptor method toWPS2Input.
@Override
public DataInput toWPS2Input(Path candidate) throws UnconvertibleObjectException {
if (candidate instanceof ReferenceProxy)
return super.toWPS2Input(candidate);
final byte[] bytes;
try {
bytes = Files.readAllBytes(candidate);
} catch (IOException ex) {
throw new UnconvertibleObjectException(ex.getMessage(), ex);
}
final String cdata = new String(bytes, Charset.forName("UTF-8"));
final DataInput dit = new DataInput();
final Data data = new Data();
data.getContent().add("<![CDATA[" + cdata + "]]>");
dit.setData(data);
return dit;
}
use of com.microsoft.applicationinsights.smoketest.schemav2.Data in project geotoolkit by Geomatys.
the class LiteralAdaptor method toWPS2Input.
public DataInput toWPS2Input(Object candidate, boolean rawLiteral) {
final Data data = new Data();
final LiteralValue litValue = new LiteralValue();
litValue.setDataType(WPSConvertersUtils.getDataTypeString("2.0.0", getValueClass()));
litValue.setValue(String.valueOf(candidate));
litValue.setUom(unit == null ? null : unit.getName());
if (rawLiteral) {
data.getContent().add(String.valueOf(candidate));
} else {
data.getContent().add(litValue);
}
final DataInput dit = new DataInput();
dit.setData(data);
return dit;
}
use of com.microsoft.applicationinsights.smoketest.schemav2.Data in project geotoolkit by Geomatys.
the class TextAdaptor method toWPS2Input.
@Override
public DataInput toWPS2Input(CharSequence candidate) throws UnconvertibleObjectException {
if (candidate instanceof ReferenceProxy) {
return super.toWPS2Input(candidate);
}
final ComplexData cdt = new ComplexData();
cdt.getContent().add(new org.geotoolkit.wps.xml.v200.Format(encoding, mimeType, schema, null));
cdt.getContent().add("<![CDATA[" + candidate + "]]>");
final Data data = new Data();
data.getContent().add(cdt);
final DataInput dit = new DataInput();
dit.setData(data);
return dit;
}
Aggregations