private void writeIdentifier( CodeType id ) throws XMLStreamException { writer.writeStartElement( "ows", "Identifier", owsNS ); if ( id.getCodeSpace() != null ) { writer.writeCharacters( id.getCodeSpace() + ":" + id.getCode() ); } else { writer.writeCharacters( id.getCode() ); } writer.writeEndElement(); }
@Override public OWSException inputNoSuchParameter( CodeType identifier ) { String msg = processMsg + " has no input parameter with identifier '" + identifier + "'."; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, identifier.getCode() ); }
private static void exportCodeTypeNew( XMLStreamWriter writer, org.deegree.commons.tom.ows.CodeType codeType, String localName, String owsNS ) throws XMLStreamException { if ( codeType != null ) { writer.writeStartElement( owsNS, localName ); if ( codeType.getCodeSpace() != null && !"".equals( codeType.getCodeSpace() ) ) { writer.writeAttribute( "codeSpace", codeType.getCodeSpace() ); } writer.writeCharacters( codeType.getCode() ); writer.writeEndElement(); // localName } }
@Override public OWSException outputNoSuchParameter( CodeType outputParameterId ) { String msg = processMsg + " has no output parameter with identifier '" + outputParameterId + "'."; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, outputParameterId.getCode() ); }
private static boolean equals( CodeType codeType, org.deegree.process.jaxb.java.CodeType codeType2 ) { if ( codeType2.getValue().equals( codeType.getCode() ) ) { if ( codeType2.getCodeSpace() == null ) { return codeType.getCodeSpace() == null; } return codeType2.getCodeSpace().equals( codeType.getCodeSpace() ); } return false; } }
writeElement( writer, owsNS, "Role", serviceContact.getRole().getCode() );
private static boolean equals( CodeType codeType, org.deegree.process.jaxb.java.CodeType codeType2 ) { if ( codeType2.getValue().equals( codeType.getCode() ) ) { if ( codeType2.getCodeSpace() == null ) { return codeType.getCodeSpace() == null; } return codeType2.getCodeSpace().equals( codeType.getCodeSpace() ); } return false; }
/** * Creates a new {@link WPSClient} instance. * * @param capabilitiesURL * url of a WPS capabilities document, usually this is a GetCapabilities request to a WPS service, must * not be <code>null</code> * @throws OWSException * if the server replied with an exception * @throws IOException * if a communication/network problem occured */ public WPSClient( URL capabilitiesURL ) throws OWSExceptionReport, IOException { WPS100CapabilitiesAdapter capabilitiesDoc = retrieveCapabilities( capabilitiesURL ); // TODO what if server only supports Get? What is optional and what is mandatory? describeProcessURLs[0] = capabilitiesDoc.getOperationURL( "DescribeProcess", false ); describeProcessURLs[1] = capabilitiesDoc.getOperationURL( "DescribeProcess", true ); executeURLs[0] = capabilitiesDoc.getOperationURL( "Execute", false ); executeURLs[1] = capabilitiesDoc.getOperationURL( "Execute", true ); metadata = capabilitiesDoc.parseMetadata(); for ( ProcessInfo processInfo : capabilitiesDoc.getProcesses() ) { Process process = new Process( this, processInfo ); processIdToProcess.put( process.getId(), process ); processIdSimpleToProcess.put( process.getId().getCode(), process ); } }
private void writeGML3( GMLStdProps props ) throws XMLStreamException { StringOrRef description = props.getDescription(); if ( description != null ) { writer.writeStartElement( "gml", "description", gmlNs ); if ( description.getRef() != null ) { writer.writeAttribute( XLNNS, "xlink", description.getRef() ); } if ( description.getString() != null ) { writer.writeCharacters( description.getString() ); } writer.writeEndElement(); } for ( CodeType name : props.getNames() ) { writer.writeStartElement( "gml", "name", gmlNs ); if ( name.getCodeSpace() != null ) { writer.writeAttribute( "codeSpace", name.getCodeSpace() ); } if ( name.getCode() != null ) { writer.writeCharacters( name.getCode() ); } writer.writeEndElement(); } }
private void writeGML32( GMLStdProps props ) throws XMLStreamException { StringOrRef description = props.getDescription(); if ( description != null ) { writer.writeStartElement( "gml", "description", gmlNs ); if ( description.getRef() != null ) { writer.writeAttribute( XLNNS, "xlink", description.getRef() ); } if ( description.getString() != null ) { writer.writeCharacters( description.getString() ); } writer.writeEndElement(); } for ( CodeType name : props.getNames() ) { writer.writeStartElement( "gml", "name", gmlNs ); if ( name.getCodeSpace() != null ) { writer.writeAttribute( "codeSpace", name.getCodeSpace() ); } if ( name.getCode() != null ) { writer.writeCharacters( name.getCode() ); } writer.writeEndElement(); } } }
private void writeGML2( GMLStdProps props ) throws XMLStreamException { StringOrRef description = props.getDescription(); if ( description != null ) { writer.writeStartElement( "gml", "description", gmlNs ); if ( description.getRef() != null ) { writer.writeAttribute( XLNNS, "xlink", description.getRef() ); } if ( description.getString() != null ) { writer.writeCharacters( description.getString() ); } writer.writeEndElement(); } for ( CodeType name : props.getNames() ) { writer.writeStartElement( "gml", "name", gmlNs ); if ( name.getCodeSpace() != null ) { writer.writeAttribute( "codeSpace", name.getCodeSpace() ); } if ( name.getCode() != null ) { writer.writeCharacters( name.getCode() ); } writer.writeEndElement(); // in GML 2, only one gml:name is allowed break; } }
+ URLEncoder.encode( client.getServiceVersion(), "UTF-8" ) + "&request=DescribeProcess&identifier=" + URLEncoder.encode( processInfo.getId().getCode(), "UTF-8" ); URL finalURL = new URL( finalURLStr ); XMLAdapter describeProcessResponse = new XMLAdapter( finalURL );
writer.writeAttribute( "codeSpace", input.getIdentifier().getCodeSpace() ); writer.writeCharacters( input.getIdentifier().getCode() ); writer.writeEndElement();
writer.writeAttribute( "codeSpace", output.getIdentifier().getCodeSpace() ); writer.writeCharacters( output.getIdentifier().getCode() ); writer.writeEndElement();
writer.writeCharacters( codeType.getCode() );