I have created a wps-process and want to add some metadata to the process.
(Not the DataInputs)
With the annotation @DescribeProcess you can specify the title, description
and version of the process. How can I specify some metadata?
Do I have to specify this in de class of the process or do I have to specify
something in the DescribeProcess-class (I haven't found any methods for
setting or getting metadata in the classes ProcessFactory or
ProcessDescriptionType???)
In the DescribeProcess-response, there should be shown the metadata-element
like:
On Thu, Oct 10, 2013 at 11:25 AM, vermesser123 <maxmeier35@anonymised.com> wrote:
I have created a wps-process and want to add some metadata to the process.
(Not the DataInputs)
With the annotation @DescribeProcess you can specify the title, description
and version of the process. How can I specify some metadata?
Do I have to specify this in de class of the process or do I have to
specify
something in the DescribeProcess-class (I haven't found any methods for
setting or getting metadata in the classes ProcessFactory or
ProcessDescriptionType???)
There is no notion of process metadata, the process susbsytem is developed
in GeoTools
and is somehow independent from a WPS usage, it's meant to be used as is,
within
desktop, batch or command line tools to.
So, an evolution of the ProcessFactory interfaces, as well as a extension
of the existing
annotations (or new annotations) would be require.
Either that, or develop sub-interfaces that are WPS aware.
You can discuss these evolutions on the developer lists, eventually make a
formal proposals to
change the API, and finally provide a pull request (in this order, if you
go with a pull request
with no previous discussion the community might also end up having to
reject the change).
In the DescribeProcess.java you can create a MetadataType-Object (with
Ows11Factory). Then, you can add it to the ProcessDescriptionType-Object
(....getMetadata().add(...)).
Unfortunately you can only define the attribute "about" and "title" in the
MetadataType-Object.
Do somebody know, how to declare the "xlink:href"-attribute. Normally, the
Metadata-information links to a resource, so this attribute should be
supported?!
I tried it with the MetadataType-Datatype from ows20. But the creation of
the object with Ows20factory.createMetadataType failed (Caused by:
java.lang.IllegalArgumentException: The value 'simple' is invalid.)
I think, with the function
MetadataType.getAbstractMetaDataGroup().add(EStructuralFeature feature,
Object value) you can add the href-attribute. But how to create the
EStructuralFeature??
I tried it with loading the EStructuralFeature "href" from the ecore-model
"ows11.ecore"
URI uri = URI.createFileURI(new File("Q:/ows11.ecore").getAbsolutePath());
EcoreResourceFactoryImpl ecoreResourceFactory = new
EcoreResourceFactoryImpl();
Resource ecoreResource = ecoreResourceFactory.createResource(uri);
I got the error "The feature 'href's type 'null' does not permit a value of
type 'java.lang.String'"
I thought, the EType of href isn't defined.
I loaded the XMLType.ecore in the same way as the ows11.ecore and extracted
the EDataType AnySimpleType. Then I initialized the href's EType with this
value.
Next error: Invalid entry feature 'AbstractReferenceBaseType.href'
Does somebody has an idea (perhaps the right solution???)