[Geoserver-users] Possible to use app-schema with REST?

Hello.
I'm trying to figure out for sometime now if it would be possible to use
"app-schema" only with REST?
What I mean is: Creating an app-schema datastore and also upload the
necessary mapping file (using REST).

Tried some variations from examples on this link:
http://docs.geoserver.org/stable/en/user/rest/examples/curl.html
<http://docs.geoserver.org/stable/en/user/rest/examples/curl.html&gt; but
well nothing seemed go give me the results I'm looking for.

So first I'm going to ask if it's actually possible to achieve what I have
in mind and if it is possible, how could I do it?
Thank you for any hints and help.

Regards
Matic

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Possible-to-use-app-schema-with-REST-tp5132216.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Sorry, Matic, as far as I know, REST operations on app-schema datastores are not supported at this time.

Kind regards,
Ben.

On 31/03/14 19:21, Feniks wrote:

Hello.
I'm trying to figure out for sometime now if it would be possible to use
"app-schema" only with REST?
What I mean is: Creating an app-schema datastore and also upload the
necessary mapping file (using REST).

Tried some variations from examples on this link:
http://docs.geoserver.org/stable/en/user/rest/examples/curl.html
<http://docs.geoserver.org/stable/en/user/rest/examples/curl.html&gt; but
well nothing seemed go give me the results I'm looking for.

So first I'm going to ask if it's actually possible to achieve what I have
in mind and if it is possible, how could I do it?
Thank you for any hints and help.

Regards
Matic

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Possible-to-use-app-schema-with-REST-tp5132216.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Matic,

Rini reminded me that at least one user (Sina) had some success with REST on app-schema datastores, and that I previously fixed a problem they encountered:

https://jira.codehaus.org/browse/GEOS-4841
http://osgeo-org.1560.x6.nabble.com/2-1-2-REST-create-featuretype-with-app-schema-datastore-td3786724.html

Unfortunately, all the nabble attachment links are broken.

The unit test:
https://github.com/geoserver/geoserver/blob/master/src/extension/app-schema/app-schema-test/src/test/java/org/geoserver/test/RestconfigWfsTest.java

Sina, do you still have your rest_script.php or a similar example for Matic? We should put an example in the manual.

Kind regards,
Ben.

On 01/04/14 17:13, Ben Caradoc-Davies wrote:

Sorry, Matic, as far as I know, REST operations on app-schema datastores
are not supported at this time.

Kind regards,
Ben.

On 31/03/14 19:21, Feniks wrote:

Hello.
I'm trying to figure out for sometime now if it would be possible to use
"app-schema" only with REST?
What I mean is: Creating an app-schema datastore and also upload the
necessary mapping file (using REST).

Tried some variations from examples on this link:
http://docs.geoserver.org/stable/en/user/rest/examples/curl.html
<http://docs.geoserver.org/stable/en/user/rest/examples/curl.html&gt; but
well nothing seemed go give me the results I'm looking for.

So first I'm going to ask if it's actually possible to achieve what I
have
in mind and if it is possible, how could I do it?
Thank you for any hints and help.

Regards
Matic

--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Possible-to-use-app-schema-with-REST-tp5132216.html

Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Hey, well I managed to create a datastore and featuretype (though I had to
copy the mapping file "manualy") with
curl -v -u admin:geoserver -XPOST -T datastore.xml -H "Content-type:
text/xml" http://localhost:8090/geoserver/rest/workspaces/gsml/datastores

curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d
@featuretype.xml
http://localhost:8090/geoserver/rest/workspaces/gsml/datastores/gsml_GeologicUnit/featuretypes

Now if only I could do something similar for the mapping file ...

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Possible-to-use-app-schema-with-REST-tp5132216p5132591.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Wed, Apr 2, 2014 at 8:03 AM, Feniks <svab.matic@anonymised.com> wrote:

Hey, well I managed to create a datastore and featuretype (though I had to
copy the mapping file "manualy") with
curl -v -u admin:geoserver -XPOST -T datastore.xml -H "Content-type:
text/xml" http://localhost:8090/geoserver/rest/workspaces/gsml/datastores

curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d
@featuretype.xml

http://localhost:8090/geoserver/rest/workspaces/gsml/datastores/gsml_GeologicUnit/featuretypes

Now if only I could do something similar for the mapping file ...

While we don't have a file management rest api, there is a embedded ftp
server
as a community module here:
http://ares.boundlessgeo.com/geoserver/2.5.x/community-latest/geoserver-2.5-SNAPSHOT-ftp-plugin.zip

It uses the same users as GeoServer and allows you to move files within the
data dir.

Also, generically speaking, it would be nice if someone could just send a
zip with
all the schemas and mapping files as a store creation "meat", just like we
can
create a shapefile store by uploading the shapefile.

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

geowolf wrote

While we don't have a file management rest api, there is a embedded ftp
server
as a community module here:
http://ares.boundlessgeo.com/geoserver/2.5.x/community-latest/geoserver-2.5-SNAPSHOT-ftp-plugin.zip

It uses the same users as GeoServer and allows you to move files within
the
data dir.

Thanks, will give that ftp module a try.

geowolf wrote

Also, generically speaking, it would be nice if someone could just send a
zip with
all the schemas and mapping files as a store creation "meat", just like we
can
create a shapefile store by uploading the shapefile.

Yes, if that would be possible it would be great, but atm we are probably
going to save this problem with ftp.

Oh, and one more thing about app-schema.
Does anyone maybe know how or if it's even possible to do a "WHERE" *inside
a mapping file* (using a Filter with wfs request isn't an option).

Example:
Lets say we have 4 elements in a database with one of the columns being
"include" (true or false). Default output would be:
<featureMembers>
   <feature>
     ... data from first row
   </feature>
   <feature>
     ... data from second row
   </feature>
   <feature>
     ... data from third row
   </feature>
   <feature>
     ... data from fourth row
   </feature>
<featureMembers>

Now lets say we only want to show those that have include = true (in this
case lets say second and third). Output should be like:
<featureMembers>
   <feature>
     ... data from second row
   </feature>
   <feature>
     ... data from third row
   </feature>
<featureMembers>

But as mentioned before if this could be achieved with some configuration
inside the mapping file.
I hope I was clear enough about what I wish to do.

Thank you for any tips.

Regards
Matic

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Possible-to-use-app-schema-with-REST-tp5132216p5132672.html
Sent from the GeoServer - User mailing list archive at Nabble.com.