Search in sources :

Example 1 with ValidTime

use of org.geotoolkit.sml.xml.v100.ValidTime in project geotoolkit by Geomatys.

the class SmlXMLBindingTest method ComponentUnmarshallMarshalingTest.

/**
 * Test simple Record Marshalling.
 *
 * @throws java.lang.Exception
 */
@Test
public void ComponentUnmarshallMarshalingTest() throws Exception {
    Unmarshaller unmarshaller = SensorMLMarshallerPool.getInstance().acquireUnmarshaller();
    InputStream is = SmlXMLBindingTest.class.getResourceAsStream("/org/geotoolkit/sml/component.xml");
    Object unmarshalled = unmarshaller.unmarshal(is);
    if (unmarshalled instanceof JAXBElement) {
        unmarshalled = ((JAXBElement) unmarshalled).getValue();
    }
    assertTrue(unmarshalled instanceof SensorML);
    SensorML result = (SensorML) unmarshalled;
    Member member = new Member();
    member.setRole("urn:x-ogx:def:sensor:OGC:detector");
    ComponentType component = new ComponentType();
    List<JAXBElement<String>> kw = new ArrayList<JAXBElement<String>>();
    kw.add(sml100Factory.createKeywordsKeywordListKeyword("piezometer"));
    kw.add(sml100Factory.createKeywordsKeywordListKeyword("geosciences"));
    kw.add(sml100Factory.createKeywordsKeywordListKeyword("point d'eau"));
    Keywords keywords = new Keywords(new KeywordList(URI.create("urn:x-brgm:def:gcmd:keywords"), kw));
    component.setKeywords(keywords);
    Classifier cl1 = new Classifier("intendedApplication", new Term("eaux souterraines", URI.create("urn:x-ogc:def:classifier:OGC:application")));
    CodeSpacePropertyType cs = new CodeSpacePropertyType("urn:x-brgm:def:GeoPoint:bss");
    Classifier cl2 = new Classifier("sensorType", new Term(cs, "Profondeur", URI.create("urn:sensor:classifier:sensorType")));
    List<Classifier> cls = new ArrayList<Classifier>();
    cls.add(cl1);
    cls.add(cl2);
    ClassifierList claList = new ClassifierList(null, cls);
    Classification classification = new Classification(claList);
    component.setClassification(classification);
    List<Identifier> identifiers = new ArrayList<Identifier>();
    cs = new CodeSpacePropertyType("urn:x-brgm:def:sensorSystem:hydras");
    Identifier id1 = new Identifier("supervisorCode", new Term(cs, "00ARGLELES_2000", URI.create("urn:x-ogc:def:identifier:OGC:modelNumber")));
    Identifier id2 = new Identifier("longName", new Term("Madofil II", URI.create("urn:x-ogc:def:identifier:OGC:longname")));
    identifiers.add(id1);
    identifiers.add(id2);
    IdentifierList identifierList = new IdentifierList(null, identifiers);
    Identification identification = new Identification(identifierList);
    component.setIdentification(identification);
    TimePeriodType period = new TimePeriodType(new TimePositionType("2004-06-01"));
    ValidTime vTime = new ValidTime(period);
    component.setValidTime(vTime);
    Capabilities capabilities = new Capabilities();
    TimeRange timeRange = new TimeRange(Arrays.asList("1987-04-23", "now"));
    DataComponentPropertyType field = new DataComponentPropertyType("periodOfData", "urn:x-brgm:def:property:periodOfData", timeRange);
    DataRecordType record = new DataRecordType("urn:x-brgm:def:property:periodOfData", Arrays.asList(field));
    JAXBElement<? extends AbstractDataRecordType> jbRecord = swe100Factory.createDataRecord(record);
    capabilities.setAbstractDataRecord(jbRecord);
    component.setCapabilities(capabilities);
    Contact contact = new Contact("urn:x-ogc:def:role:manufacturer", new ResponsibleParty("IRIS"));
    component.setContact(contact);
    Position position = new Position("conductivitePosition", "piezometer#piezoPosition");
    component.setPosition(position);
    IoComponentPropertyType io = new IoComponentPropertyType("level", new ObservableProperty("urn:x-ogc:def:phenomenon:OGC:level"));
    InputList inputList = new InputList(Arrays.asList(io));
    Inputs inputs = new Inputs(inputList);
    component.setInputs(inputs);
    IoComponentPropertyType io2 = new IoComponentPropertyType("depth", new ObservableProperty("urn:x-ogc:def:phenomenon:OGC:depth"));
    OutputList outputList = new OutputList(Arrays.asList(io2));
    Outputs outputs = new Outputs(outputList);
    component.setOutputs(outputs);
    List<DataComponentPropertyType> params = new ArrayList<DataComponentPropertyType>();
    UomPropertyType uom = new UomPropertyType(null, "urn:ogc:unit:minuts");
    QuantityType quantity1 = new QuantityType("urn:x-ogc:def:property:frequency", uom, 60.0);
    DataComponentPropertyType p1 = new DataComponentPropertyType("frequency", "urn:x-ogc:def:property:frequency", quantity1);
    params.add(p1);
    UomPropertyType uom2 = new UomPropertyType("m", null);
    QuantityType quantity2 = new QuantityType("urn:x-ogc:def:property:precision", uom2, 0.05);
    DataComponentPropertyType p2 = new DataComponentPropertyType("precision", "urn:x-ogc:def:property:precision", quantity2);
    params.add(p2);
    QuantityRange quantityRange = new QuantityRange(uom2, Arrays.asList(0.0, 10.0));
    DataComponentPropertyType p3 = new DataComponentPropertyType("validity", "urn:x-ogc:def:property:validity", quantityRange);
    params.add(p3);
    ParameterList paramList = new ParameterList(params);
    Parameters parameters = new Parameters(paramList);
    component.setParameters(parameters);
    component.setPosition(new Position("conductivitePosition", "piezometer#piezoPosition"));
    component.setName(new DefaultIdentifier("Capteur Profondeur de ARGELES"));
    member.setProcess(sml100Factory.createComponent(component));
    SensorML expectedResult = new SensorML("1.0", Arrays.asList(member));
    assertEquals(result.getMember().size(), 1);
    assertTrue(result.getMember().get(0).getProcess() != null);
    assertTrue(result.getMember().get(0).getProcess().getValue() instanceof ComponentType);
    ComponentType resultProcess = (ComponentType) result.getMember().get(0).getProcess().getValue();
    assertEquals(resultProcess.getCapabilities(), component.getCapabilities());
    assertTrue(resultProcess.getContact().size() == 1);
    assertEquals(resultProcess.getContact().get(0).getContactList(), component.getContact().get(0).getContactList());
    assertEquals(resultProcess.getContact().get(0).getResponsibleParty().getContactInfo(), component.getContact().get(0).getResponsibleParty().getContactInfo());
    assertEquals(resultProcess.getContact().get(0).getResponsibleParty().getOrganizationName(), component.getContact().get(0).getResponsibleParty().getOrganizationName());
    assertEquals(resultProcess.getContact().get(0).getResponsibleParty(), component.getContact().get(0).getResponsibleParty());
    assertEquals(resultProcess.getContact().get(0), component.getContact().get(0));
    assertEquals(resultProcess.getContact(), component.getContact());
    assertTrue(resultProcess.getClassification().size() == 1);
    assertTrue(resultProcess.getClassification().get(0).getClassifierList().getClassifier().size() == 2);
    assertEquals(resultProcess.getClassification().get(0).getClassifierList().getClassifier().get(0).getTerm(), component.getClassification().get(0).getClassifierList().getClassifier().get(0).getTerm());
    assertEquals(resultProcess.getClassification().get(0).getClassifierList().getClassifier().get(0), component.getClassification().get(0).getClassifierList().getClassifier().get(0));
    assertEquals(resultProcess.getClassification().get(0).getClassifierList().getClassifier(), component.getClassification().get(0).getClassifierList().getClassifier());
    assertEquals(resultProcess.getClassification().get(0).getClassifierList(), component.getClassification().get(0).getClassifierList());
    assertEquals(resultProcess.getClassification().get(0), component.getClassification().get(0));
    assertEquals(resultProcess.getClassification(), component.getClassification());
    assertEquals(resultProcess.getIdentification(), component.getIdentification());
    assertEquals(resultProcess.getValidTime(), component.getValidTime());
    assertEquals(resultProcess.getParameters(), component.getParameters());
    assertEquals(resultProcess.getInputs().getInputList().getInput(), component.getInputs().getInputList().getInput());
    assertEquals(resultProcess.getInputs().getInputList(), component.getInputs().getInputList());
    assertEquals(resultProcess.getInputs(), component.getInputs());
    assertEquals(resultProcess.getOutputs(), component.getOutputs());
    assertEquals(resultProcess.getSMLLocation(), component.getSMLLocation());
    assertEquals(resultProcess.getPosition(), component.getPosition());
    assertEquals(resultProcess.getSpatialReferenceFrame(), component.getSpatialReferenceFrame());
    assertEquals(resultProcess.getDocumentation(), component.getDocumentation());
    assertEquals(resultProcess.getCharacteristics(), component.getCharacteristics());
    assertEquals(resultProcess.getKeywords(), component.getKeywords());
    assertEquals(resultProcess.getParameters(), component.getParameters());
    assertEquals(resultProcess.getName(), component.getName());
    assertEquals(resultProcess, component);
    assertEquals(expectedResult.getMember().get(0), result.getMember().get(0));
    assertEquals(expectedResult.getMember(), result.getMember());
    assertEquals(expectedResult, result);
    SensorMLMarshallerPool.getInstance().recycle(unmarshaller);
}
Also used : DataRecordType(org.geotoolkit.swe.xml.v100.DataRecordType) AbstractDataRecordType(org.geotoolkit.swe.xml.v100.AbstractDataRecordType) Keywords(org.geotoolkit.sml.xml.v100.Keywords) InputList(org.geotoolkit.sml.xml.v100.InputList) ArrayList(java.util.ArrayList) Identification(org.geotoolkit.sml.xml.v100.Identification) Classifier(org.geotoolkit.sml.xml.v100.Classifier) IdentifierList(org.geotoolkit.sml.xml.v100.IdentifierList) ValidTime(org.geotoolkit.sml.xml.v100.ValidTime) UomPropertyType(org.geotoolkit.swe.xml.v100.UomPropertyType) Identifier(org.geotoolkit.sml.xml.v100.Identifier) DefaultIdentifier(org.apache.sis.metadata.iso.DefaultIdentifier) ObservableProperty(org.geotoolkit.swe.xml.v100.ObservableProperty) Classification(org.geotoolkit.sml.xml.v100.Classification) CodeSpacePropertyType(org.geotoolkit.swe.xml.v100.CodeSpacePropertyType) DataComponentPropertyType(org.geotoolkit.swe.xml.v100.DataComponentPropertyType) DefaultIdentifier(org.apache.sis.metadata.iso.DefaultIdentifier) Unmarshaller(javax.xml.bind.Unmarshaller) Member(org.geotoolkit.sml.xml.v100.Member) Inputs(org.geotoolkit.sml.xml.v100.Inputs) TimePositionType(org.geotoolkit.gml.xml.v311.TimePositionType) ComponentType(org.geotoolkit.sml.xml.v100.ComponentType) Parameters(org.geotoolkit.sml.xml.v100.Parameters) Position(org.geotoolkit.sml.xml.v100.Position) InputStream(java.io.InputStream) ClassifierList(org.geotoolkit.sml.xml.v100.ClassifierList) QuantityRange(org.geotoolkit.swe.xml.v100.QuantityRange) JAXBElement(javax.xml.bind.JAXBElement) Term(org.geotoolkit.sml.xml.v100.Term) ResponsibleParty(org.geotoolkit.sml.xml.v100.ResponsibleParty) SensorML(org.geotoolkit.sml.xml.v100.SensorML) IoComponentPropertyType(org.geotoolkit.sml.xml.v100.IoComponentPropertyType) Contact(org.geotoolkit.sml.xml.v100.Contact) TimeRange(org.geotoolkit.swe.xml.v100.TimeRange) TimePeriodType(org.geotoolkit.gml.xml.v311.TimePeriodType) QuantityType(org.geotoolkit.swe.xml.v100.QuantityType) Capabilities(org.geotoolkit.sml.xml.v100.Capabilities) KeywordList(org.geotoolkit.sml.xml.v100.KeywordList) Outputs(org.geotoolkit.sml.xml.v100.Outputs) ParameterList(org.geotoolkit.sml.xml.v100.ParameterList) OutputList(org.geotoolkit.sml.xml.v100.OutputList)

Example 2 with ValidTime

use of org.geotoolkit.sml.xml.v100.ValidTime in project geotoolkit by Geomatys.

the class SmlXMLFactory method convertTo101.

public static org.geotoolkit.sml.xml.v101.SensorML convertTo101(final org.geotoolkit.sml.xml.v100.SensorML sensor) {
    List<org.geotoolkit.sml.xml.v101.SensorML.Member> newMembers = new ArrayList<org.geotoolkit.sml.xml.v101.SensorML.Member>();
    for (Member oldMember : sensor.getMember()) {
        final org.geotoolkit.sml.xml.v101.AbstractProcessType newProcess;
        if (oldMember.getRealProcess() instanceof System) {
            newProcess = new org.geotoolkit.sml.xml.v101.SystemType();
        } else if (oldMember.getRealProcess() instanceof Component) {
            newProcess = new org.geotoolkit.sml.xml.v101.ComponentType();
        } else if (oldMember.getRealProcess() instanceof AbstractDataSource) {
            newProcess = new org.geotoolkit.sml.xml.v101.DataSourceType();
        } else if (oldMember.getRealProcess() instanceof AbstractProcessModel) {
            newProcess = new org.geotoolkit.sml.xml.v101.ProcessModelType();
        } else if (oldMember.getRealProcess() instanceof ComponentArray) {
            newProcess = new org.geotoolkit.sml.xml.v101.ComponentArrayType();
        } else {
            throw new IllegalArgumentException("Other sensor type than system, component, processModel, processChain, componentArray or datasource are not yet convertible");
        }
        AbstractProcessType oldProcess = (AbstractProcessType) oldMember.getRealProcess();
        // id
        newProcess.setId(oldProcess.getId());
        // name
        newProcess.setName(oldProcess.getName());
        // srsName
        newProcess.setSrsName(oldProcess.getSrsName());
        // description
        newProcess.setDescription(oldProcess.getDescription());
        // boundedBy
        newProcess.setBoundedBy(oldProcess.getBoundedBy());
        // capabilities
        List<org.geotoolkit.sml.xml.v101.Capabilities> newCapabilities = new ArrayList<org.geotoolkit.sml.xml.v101.Capabilities>();
        for (Capabilities oldCapa : oldProcess.getCapabilities()) {
            newCapabilities.add(new org.geotoolkit.sml.xml.v101.Capabilities(oldCapa));
        }
        newProcess.setCapabilities(newCapabilities);
        // characteristics
        List<org.geotoolkit.sml.xml.v101.Characteristics> newCharacteristics = new ArrayList<org.geotoolkit.sml.xml.v101.Characteristics>();
        for (Characteristics oldChar : oldProcess.getCharacteristics()) {
            newCharacteristics.add(new org.geotoolkit.sml.xml.v101.Characteristics(oldChar));
        }
        newProcess.setCharacteristics(newCharacteristics);
        // Classification
        List<org.geotoolkit.sml.xml.v101.Classification> newClassification = new ArrayList<org.geotoolkit.sml.xml.v101.Classification>();
        for (Classification oldClass : oldProcess.getClassification()) {
            newClassification.add(new org.geotoolkit.sml.xml.v101.Classification(oldClass));
        }
        newProcess.setClassification(newClassification);
        // Contact
        List<org.geotoolkit.sml.xml.v101.Contact> newContact = new ArrayList<org.geotoolkit.sml.xml.v101.Contact>();
        for (Contact oldContact : oldProcess.getContact()) {
            newContact.add(new org.geotoolkit.sml.xml.v101.Contact(oldContact));
        }
        newProcess.setContact(newContact);
        // Contact
        List<org.geotoolkit.sml.xml.v101.Documentation> newDocumentation = new ArrayList<org.geotoolkit.sml.xml.v101.Documentation>();
        for (Documentation oldDoc : oldProcess.getDocumentation()) {
            newDocumentation.add(new org.geotoolkit.sml.xml.v101.Documentation(oldDoc));
        }
        newProcess.setDocumentation(newDocumentation);
        // History
        List<org.geotoolkit.sml.xml.v101.History> newHistory = new ArrayList<org.geotoolkit.sml.xml.v101.History>();
        for (History oldhist : oldProcess.getHistory()) {
            newHistory.add(new org.geotoolkit.sml.xml.v101.History(oldhist));
        }
        newProcess.setHistory(newHistory);
        // Identification
        List<org.geotoolkit.sml.xml.v101.Identification> newIdentification = new ArrayList<org.geotoolkit.sml.xml.v101.Identification>();
        for (Identification oldIdent : oldProcess.getIdentification()) {
            newIdentification.add(new org.geotoolkit.sml.xml.v101.Identification(oldIdent));
        }
        newProcess.setIdentification(newIdentification);
        // keywords
        List<org.geotoolkit.sml.xml.v101.Keywords> newKeywords = new ArrayList<org.geotoolkit.sml.xml.v101.Keywords>();
        for (Keywords oldKeyw : oldProcess.getKeywords()) {
            newKeywords.add(new org.geotoolkit.sml.xml.v101.Keywords(oldKeyw));
        }
        newProcess.setKeywords(newKeywords);
        // legal constraint
        List<org.geotoolkit.sml.xml.v101.LegalConstraint> newLegalConstraints = new ArrayList<org.geotoolkit.sml.xml.v101.LegalConstraint>();
        for (LegalConstraint oldcons : oldProcess.getLegalConstraint()) {
            newLegalConstraints.add(new org.geotoolkit.sml.xml.v101.LegalConstraint(oldcons));
        }
        newProcess.setLegalConstraint(newLegalConstraints);
        // security constraint
        if (oldProcess.getSecurityConstraint() != null) {
            newProcess.setSecurityConstraint(new org.geotoolkit.sml.xml.v101.SecurityConstraint(oldProcess.getSecurityConstraint()));
        }
        // validTime
        if (oldProcess.getValidTime() != null) {
            newProcess.setValidTime(oldProcess.getValidTime());
        }
        if (oldProcess instanceof AbstractComponent) {
            AbstractComponent newAbsComponent = (AbstractComponent) newProcess;
            AbstractComponent oldAbsComponent = (AbstractComponent) oldProcess;
            // Inputs
            if (oldAbsComponent.getInputs() != null) {
                newAbsComponent.setInputs(oldAbsComponent.getInputs());
            }
            // outputs
            if (oldAbsComponent.getOutputs() != null) {
                newAbsComponent.setOutputs(oldAbsComponent.getOutputs());
            }
            // parameters
            if (oldAbsComponent.getParameters() != null) {
                newAbsComponent.setParameters(oldAbsComponent.getParameters());
            }
        }
        if (oldProcess instanceof AbstractDerivableComponent) {
            org.geotoolkit.sml.xml.v101.AbstractDerivableComponentType newDerComponent = (org.geotoolkit.sml.xml.v101.AbstractDerivableComponentType) newProcess;
            AbstractDerivableComponent oldDerComponent = (AbstractDerivableComponent) oldProcess;
            // Position
            if (oldDerComponent.getPosition() != null) {
                newDerComponent.setPosition(oldDerComponent.getPosition());
            }
            if (oldDerComponent.getSMLLocation() != null) {
                newDerComponent.setSMLLocation(oldDerComponent.getSMLLocation());
            }
            if (oldDerComponent.getInterfaces() != null) {
                newDerComponent.setInterfaces(new org.geotoolkit.sml.xml.v101.Interfaces(oldDerComponent.getInterfaces()));
            }
            if (oldDerComponent.getSpatialReferenceFrame() != null) {
                newDerComponent.setSpatialReferenceFrame(new org.geotoolkit.sml.xml.v101.SpatialReferenceFrame(oldDerComponent.getSpatialReferenceFrame()));
            }
            if (oldDerComponent.getTemporalReferenceFrame() != null) {
                newDerComponent.setTemporalReferenceFrame(new org.geotoolkit.sml.xml.v101.TemporalReferenceFrame(oldDerComponent.getTemporalReferenceFrame()));
            }
            if (oldDerComponent.getTimePosition() != null) {
                newDerComponent.setTimePosition(new org.geotoolkit.sml.xml.v101.TimePosition(oldDerComponent.getTimePosition()));
            }
        }
        if (oldProcess instanceof AbstractPureProcess) {
            org.geotoolkit.sml.xml.v101.AbstractPureProcessType newAbsPuProc = (org.geotoolkit.sml.xml.v101.AbstractPureProcessType) newProcess;
            AbstractPureProcess oldAbsPuProc = (AbstractPureProcess) oldProcess;
            // Inputs
            if (oldAbsPuProc.getInputs() != null) {
                newAbsPuProc.setInputs(new org.geotoolkit.sml.xml.v101.Inputs(oldAbsPuProc.getInputs()));
            }
            // outputs
            if (oldAbsPuProc.getOutputs() != null) {
                newAbsPuProc.setOutputs(new org.geotoolkit.sml.xml.v101.Outputs(oldAbsPuProc.getOutputs()));
            }
            // parameters
            if (oldAbsPuProc.getParameters() != null) {
                newAbsPuProc.setParameters(new org.geotoolkit.sml.xml.v101.Parameters(oldAbsPuProc.getParameters()));
            }
        }
        if (oldMember.getRealProcess() instanceof System) {
            SystemType oldSystem = (SystemType) oldMember.getRealProcess();
            org.geotoolkit.sml.xml.v101.SystemType newSystem = (org.geotoolkit.sml.xml.v101.SystemType) newProcess;
            // components
            if (oldSystem.getComponents() != null) {
                newSystem.setComponents(new org.geotoolkit.sml.xml.v101.Components(oldSystem.getComponents()));
            }
            // positions
            if (oldSystem.getPositions() != null) {
                newSystem.setPositions(new org.geotoolkit.sml.xml.v101.Positions(oldSystem.getPositions()));
            }
            // connections
            if (oldSystem.getConnections() != null) {
                newSystem.setConnections(new org.geotoolkit.sml.xml.v101.Connections(oldSystem.getConnections()));
            }
        } else if (oldMember.getRealProcess() instanceof Component) {
            ComponentType oldComponent = (ComponentType) oldMember.getRealProcess();
            org.geotoolkit.sml.xml.v101.ComponentType newCompo = (org.geotoolkit.sml.xml.v101.ComponentType) newProcess;
            // method
            if (oldComponent.getMethod() != null) {
                newCompo.setMethod(new org.geotoolkit.sml.xml.v101.MethodPropertyType(oldComponent.getMethod()));
            }
        } else if (oldMember.getRealProcess() instanceof AbstractDataSource) {
            DataSourceType oldDataSource = (DataSourceType) oldMember.getRealProcess();
            org.geotoolkit.sml.xml.v101.DataSourceType newDataSource = (org.geotoolkit.sml.xml.v101.DataSourceType) newProcess;
            if (oldDataSource.getDataDefinition() != null) {
                newDataSource.setDataDefinition(new org.geotoolkit.sml.xml.v101.DataDefinition(oldDataSource.getDataDefinition()));
            }
            if (oldDataSource.getValues() != null) {
                newDataSource.setValues(new org.geotoolkit.sml.xml.v101.Values(oldDataSource.getValues()));
            }
            if (oldDataSource.getObservationReference() != null) {
                newDataSource.setObservationReference(new org.geotoolkit.sml.xml.v101.ObservationReference(oldDataSource.getObservationReference()));
            }
        } else if (oldMember.getRealProcess() instanceof AbstractProcessModel) {
            ProcessModelType oldProcessModel = (ProcessModelType) oldMember.getRealProcess();
            org.geotoolkit.sml.xml.v101.ProcessModelType newProcessModel = (org.geotoolkit.sml.xml.v101.ProcessModelType) newProcess;
            if (oldProcessModel.getMethod() != null) {
                newProcessModel.setMethod(new org.geotoolkit.sml.xml.v101.MethodPropertyType(oldProcessModel.getMethod()));
            }
        } else if (oldMember.getRealProcess() instanceof AbstractProcessChain) {
            ProcessChainType oldProcessChain = (ProcessChainType) oldMember.getRealProcess();
            org.geotoolkit.sml.xml.v101.ProcessChainType newProcessChain = (org.geotoolkit.sml.xml.v101.ProcessChainType) newProcess;
            // components
            if (oldProcessChain.getComponents() != null) {
                newProcessChain.setComponents(new org.geotoolkit.sml.xml.v101.Components(oldProcessChain.getComponents()));
            }
            // connections
            if (oldProcessChain.getConnections() != null) {
                newProcessChain.setConnections(new org.geotoolkit.sml.xml.v101.Connections(oldProcessChain.getConnections()));
            }
        } else if (oldMember.getRealProcess() instanceof ComponentArray) {
        // nothing to do
        } else {
            throw new IllegalArgumentException("Other sensor type than system ,component, processModel, processChain, componentArray or datasource are not yet convertible");
        }
        newMembers.add(new org.geotoolkit.sml.xml.v101.SensorML.Member(newProcess));
    }
    org.geotoolkit.sml.xml.v101.SensorML result = new org.geotoolkit.sml.xml.v101.SensorML("1.0.1", newMembers);
    return result;
}
Also used : ArrayList(java.util.ArrayList) SystemType(org.geotoolkit.sml.xml.v100.SystemType) History(org.geotoolkit.sml.xml.v100.History) Classification(org.geotoolkit.sml.xml.v100.Classification) DataSourceType(org.geotoolkit.sml.xml.v100.DataSourceType) Member(org.geotoolkit.sml.xml.v100.Member) Documentation(org.geotoolkit.sml.xml.v100.Documentation) AbstractProcessType(org.geotoolkit.sml.xml.v100.AbstractProcessType) Keywords(org.geotoolkit.sml.xml.v100.Keywords) LegalConstraint(org.geotoolkit.sml.xml.v100.LegalConstraint) Identification(org.geotoolkit.sml.xml.v100.Identification) ComponentType(org.geotoolkit.sml.xml.v100.ComponentType) Contact(org.geotoolkit.sml.xml.v100.Contact) Characteristics(org.geotoolkit.sml.xml.v100.Characteristics) Capabilities(org.geotoolkit.sml.xml.v100.Capabilities) ProcessModelType(org.geotoolkit.sml.xml.v100.ProcessModelType) ProcessChainType(org.geotoolkit.sml.xml.v100.ProcessChainType)

Aggregations

ArrayList (java.util.ArrayList)2 Capabilities (org.geotoolkit.sml.xml.v100.Capabilities)2 Classification (org.geotoolkit.sml.xml.v100.Classification)2 ComponentType (org.geotoolkit.sml.xml.v100.ComponentType)2 Contact (org.geotoolkit.sml.xml.v100.Contact)2 Identification (org.geotoolkit.sml.xml.v100.Identification)2 Keywords (org.geotoolkit.sml.xml.v100.Keywords)2 Member (org.geotoolkit.sml.xml.v100.Member)2 InputStream (java.io.InputStream)1 JAXBElement (javax.xml.bind.JAXBElement)1 Unmarshaller (javax.xml.bind.Unmarshaller)1 DefaultIdentifier (org.apache.sis.metadata.iso.DefaultIdentifier)1 TimePeriodType (org.geotoolkit.gml.xml.v311.TimePeriodType)1 TimePositionType (org.geotoolkit.gml.xml.v311.TimePositionType)1 AbstractProcessType (org.geotoolkit.sml.xml.v100.AbstractProcessType)1 Characteristics (org.geotoolkit.sml.xml.v100.Characteristics)1 Classifier (org.geotoolkit.sml.xml.v100.Classifier)1 ClassifierList (org.geotoolkit.sml.xml.v100.ClassifierList)1 DataSourceType (org.geotoolkit.sml.xml.v100.DataSourceType)1 Documentation (org.geotoolkit.sml.xml.v100.Documentation)1