use of net.opengis.ows11.CodeType in project ddf by codice.
the class CswEndpoint method buildServiceIdentification.
/**
* Creates the ServiceIdentification portion of the GetCapabilities response TODO: Add more
* DDF-specific information if desired (Fees, Keywords, and AccessConstraints are all currently
* empty, and the abstract is very basic)
*
* @return The constructed ServiceIdentification object
*/
private ServiceIdentification buildServiceIdentification() {
ServiceIdentification si = new ServiceIdentification();
si.setTitle(SERVICE_TITLE);
si.setServiceTypeVersion(SERVICE_TYPE_VERSION);
CodeType type = new CodeType();
type.setValue(CswConstants.CSW);
si.setServiceType(type);
si.setAbstract(SERVICE_ABSTRACT);
return si;
}
use of net.opengis.ows11.CodeType in project sldeditor by robward-scisys.
the class CustomProcessFunctionTest method createProcessDescriptionEnum.
/**
* Test the process description enumeration values.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void createProcessDescriptionEnum() {
ProcessDescriptionType process = Wps10FactoryImpl.init().createProcessDescriptionType();
CodeType codeType = Ows11FactoryImpl.init().createCodeType();
codeType.setValue("JTS:area");
process.setIdentifier(codeType);
InputDescriptionType inputDescription = Wps10FactoryImpl.init().createInputDescriptionType();
CodeType codeType2 = Ows11FactoryImpl.init().createCodeType();
codeType2.setValue("dummyParameter");
inputDescription.setIdentifier(codeType2);
inputDescription.setMinOccurs(BigInteger.valueOf(1));
inputDescription.setMaxOccurs(BigInteger.valueOf(1));
AllowedValuesType allowedValues = Ows11FactoryImpl.init().createAllowedValuesType();
EList allowedValueList = allowedValues.getValue();
ValueType item1 = Ows11FactoryImpl.init().createValueType();
item1.setValue("item 1");
allowedValueList.add(item1);
ValueType item2 = Ows11FactoryImpl.init().createValueType();
item2.setValue("item 2");
allowedValueList.add(item2);
ValueType item3 = Ows11FactoryImpl.init().createValueType();
item1.setValue("item 3");
allowedValueList.add(item3);
LiteralInputType literal = Wps10FactoryImpl.init().createLiteralInputType();
literal.setAllowedValues(allowedValues);
inputDescription.setLiteralData(literal);
DataInputsType dataInputs = Wps10FactoryImpl.init().createDataInputsType();
EList dataInputList = dataInputs.getInput();
dataInputList.add(inputDescription);
process.setDataInputs(dataInputs);
CustomProcessFunction obj = new CustomProcessFunction();
List<ProcessFunctionParameterValue> valueList = obj.extractParameters(process);
assertEquals(1, valueList.size());
ProcessFunctionParameterValue value = valueList.get(0);
assertEquals(1, value.minOccurences);
assertEquals(1, value.maxOccurences);
}
use of net.opengis.ows11.CodeType in project sldeditor by robward-scisys.
the class CustomProcessFunctionTest method createProcessDescriptionBBox.
/**
* Test the process description boundaing box values.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void createProcessDescriptionBBox() {
ProcessDescriptionType process = Wps10FactoryImpl.init().createProcessDescriptionType();
CodeType codeType = Ows11FactoryImpl.init().createCodeType();
codeType.setValue("JTS:area");
process.setIdentifier(codeType);
InputDescriptionType inputDescription = Wps10FactoryImpl.init().createInputDescriptionType();
CodeType codeType2 = Ows11FactoryImpl.init().createCodeType();
codeType2.setValue("dummyParameter");
inputDescription.setIdentifier(codeType2);
inputDescription.setMinOccurs(BigInteger.valueOf(1));
inputDescription.setMaxOccurs(BigInteger.valueOf(1));
DataInputsType dataInputs = Wps10FactoryImpl.init().createDataInputsType();
EList dataInputList = dataInputs.getInput();
dataInputList.add(inputDescription);
process.setDataInputs(dataInputs);
SupportedCRSsType crs = Wps10FactoryImpl.init().createSupportedCRSsType();
inputDescription.setBoundingBoxData(crs);
CustomProcessFunction obj = new CustomProcessFunction();
List<ProcessFunctionParameterValue> valueList = obj.extractParameters(process);
assertEquals(1, valueList.size());
ProcessFunctionParameterValue value = valueList.get(0);
assertEquals(1, value.minOccurences);
assertEquals(1, value.maxOccurences);
assertTrue(value.dataType.compareTo("BBOX") == 0);
SupportedComplexDataInputType complex = Wps10FactoryImpl.init().createSupportedComplexDataInputType();
inputDescription.setComplexData(complex);
inputDescription.setBoundingBoxData(null);
valueList = obj.extractParameters(process);
assertEquals(1, valueList.size());
value = valueList.get(0);
assertEquals(1, value.minOccurences);
assertEquals(1, value.maxOccurences);
assertTrue(value.dataType.compareTo("Geometry") == 0);
}
use of net.opengis.ows11.CodeType in project sldeditor by robward-scisys.
the class CustomProcessFunctionTest method createProcessDescription.
/**
* Creates the process description.
*
* @param type the type
* @param defaultValue the default value
* @param minOccurs the min occurs
* @param maxOccurs the max occurs
* @return the process function parameter value
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
private ProcessFunctionParameterValue createProcessDescription(String type, String defaultValue, int minOccurs, int maxOccurs) {
ProcessDescriptionType process = Wps10FactoryImpl.init().createProcessDescriptionType();
CodeType codeType = Ows11FactoryImpl.init().createCodeType();
codeType.setValue("JTS:area");
process.setIdentifier(codeType);
CodeType codeType2 = Ows11FactoryImpl.init().createCodeType();
codeType2.setValue("dummyParameter");
InputDescriptionType inputDescription = Wps10FactoryImpl.init().createInputDescriptionType();
inputDescription.setIdentifier(codeType2);
inputDescription.setMinOccurs(BigInteger.valueOf(minOccurs));
inputDescription.setMaxOccurs(BigInteger.valueOf(maxOccurs));
LiteralInputType literal = Wps10FactoryImpl.init().createLiteralInputType();
DomainMetadataType domainType = Ows11FactoryImpl.init().createDomainMetadataType();
domainType.setValue(type);
literal.setDefaultValue(defaultValue);
literal.setDataType(domainType);
inputDescription.setLiteralData(literal);
DataInputsType dataInputs = Wps10FactoryImpl.init().createDataInputsType();
EList dataInputList = dataInputs.getInput();
dataInputList.add(inputDescription);
process.setDataInputs(dataInputs);
CustomProcessFunction obj = new CustomProcessFunction();
List<ProcessFunctionParameterValue> valueList = obj.extractParameters(process);
assertEquals(type, 1, valueList.size());
ProcessFunctionParameterValue value = valueList.get(0);
assertEquals(type, minOccurs, value.minOccurences);
assertEquals(type, maxOccurs, value.maxOccurences);
return value;
}
use of net.opengis.ows11.CodeType in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityEntityToModelMapper method mapVesselStorageCharCodes.
private void mapVesselStorageCharCodes(VesselStorageCharacteristic target, Set<VesselStorageCharCodeEntity> vesselStorageCharCode) {
if (CollectionUtils.isNotEmpty(vesselStorageCharCode) && target != null) {
List<CodeType> codeTypeList = new ArrayList<>();
for (VesselStorageCharCodeEntity source : vesselStorageCharCode) {
CodeType codeType = new CodeType();
codeType.setValue(source.getVesselTypeCode());
codeType.setListID(source.getVesselTypeCodeListId());
codeTypeList.add(codeType);
}
target.setTypeCodes(codeTypeList);
}
}
Aggregations