Merge "Issue #2097 Initial update for OGC services Change-Id: I1bc8fc8a4c125bc79057c4af929c0495f0e5eb99" into development

Former-commit-id: 34a6082255 [formerly 7883b7642f [formerly 96d335d72286bba82f9054b525f47450854797d1]]
Former-commit-id: 7883b7642f
Former-commit-id: 9ce57ca237
This commit is contained in:
Richard Peter 2013-08-28 08:26:51 -05:00 committed by Gerrit Code Review
commit b41733e62f
464 changed files with 44714 additions and 11155 deletions

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ll.netcdf.linux32</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: NetCDF JNI Linux32
Bundle-SymbolicName: ll.netcdf.linux32
Bundle-Version: 1.0.0.qualifier
Fragment-Host: ll.netcdf;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86))

View file

@ -0,0 +1,12 @@
bin.includes = META-INF/,\
.,\
libhdf5.so,\
libnetcdf.so.7.2.0,\
libnetcdf.so.7,\
libnetcdf.so,\
libllnetcdf.so,\
libhdf5_hl.so.7.0.3,\
libhdf5_hl.so.7,\
libhdf5_hl.so,\
libhdf5.so.7.0.3,\
libhdf5.so.7

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ll.netcdf.linux64</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: NetCDF JNI Linux64
Bundle-SymbolicName: ll.netcdf.linux64
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Raytheon-bundled OSS
Fragment-Host: ll.netcdf;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))

View file

@ -0,0 +1,15 @@
bin.includes = META-INF/,\
.,\
libz.so.1.2.7,\
libz.so.1,\
libz.so,\
libnetcdf.so.7.2.0,\
libnetcdf.so.7,\
libnetcdf.so,\
libllnetcdf.so,\
libhdf5_hl.so.7.0.3,\
libhdf5_hl.so.7,\
libhdf5_hl.so,\
libhdf5.so.7.0.3,\
libhdf5.so.7,\
libhdf5.so

BIN
cots/ll.netcdf.linux64/libhdf5.so Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
cots/ll.netcdf.linux64/libz.so Executable file

Binary file not shown.

BIN
cots/ll.netcdf.linux64/libz.so.1 Executable file

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="ll-netcdf-jni-1.3.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

28
cots/ll.netcdf/.project Normal file
View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ll.netcdf</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Fri Mar 01 16:54:04 CST 2013
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Netcdf
Bundle-SymbolicName: ll.netcdf
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Raytheon-bundled OSS
Require-Bundle: org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: ll-netcdf-jni-1.3.jar
Export-Package: edu.mit.ll.netcdf
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View file

@ -0,0 +1,3 @@
bin.includes = META-INF/,\
.,\
ll-netcdf-jni-1.3.jar

Binary file not shown.

View file

@ -1,17 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="gml-v_3_1_1-schema-1.1.0.jar"/>
<classpathentry exported="true" kind="lib" path="wcs-v_1_1_2-schema-1.1.0.jar"/>
<classpathentry exported="true" kind="lib" path="owsnt-v_1_1_0-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="ws-addressing-schema-1.0.4.jar"/>
<classpathentry exported="true" kind="lib" path="ws-notification-schema-1.0.4.jar"/>
<classpathentry exported="true" kind="lib" path="ic-v_2_0-schema-1.0.3.jar"/>
<classpathentry exported="true" kind="lib" path="filter-v_2_0_0-schema-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="avwx-v_1_1_1-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="cv-v_0_2_2_gml32-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="om-v_1_0_0_gml32-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="sml-v_1_0_1_gml32-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="swe-v_1_0_1_gml32-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="wx-v_1_1_1-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="gml-v_3_2_1-schema-1.0.4-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="ows-v_1_1_0-schema-1.0.4-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="wfs-v_2_0_0-schema-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="filter-v_1_0_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="filter-v_1_1_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="gml-v_2_1_2-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="gml-v_3_1_1-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="jaxb2-basics-runtime-0.6.0.jar"/>
<classpathentry exported="true" kind="lib" path="kml-v_2_2_0-schema-1.0.3.jar"/>
<classpathentry exported="true" kind="lib" path="ows-v_1_0_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="ows-v_1_1_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="se-v_1_1_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="sld-v_1_0_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="sld-v_1_1_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="wcs-v_1_1_2-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="wfs-v_1_1_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="wms-v_1_3_0-schema-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="wmts-v_1_0_0-schema-1.0.3.1.jar"/>

View file

@ -6,30 +6,59 @@ Bundle-Version: 1.0.2
Bundle-ClassPath: filter-v_1_0_0-schema-1.0.2.jar,
filter-v_1_1_0-schema-1.0.2.jar,
gml-v_2_1_2-schema-1.0.2.jar,
gml-v_3_1_1-schema-1.0.2.jar,
jaxb2-basics-runtime-0.6.0.jar,
kml-v_2_2_0-schema-1.0.3.jar,
ows-v_1_0_0-schema-1.0.2.jar,
ows-v_1_1_0-schema-1.0.2.jar,
se-v_1_1_0-schema-1.0.2.jar,
sld-v_1_0_0-schema-1.0.2.jar,
sld-v_1_1_0-schema-1.0.2.jar,
wcs-v_1_1_2-schema-1.0.2.jar,
wfs-v_1_1_0-schema-1.0.2.jar,
wms-v_1_3_0-schema-1.0.2.jar,
wmts-v_1_0_0-schema-1.0.3.1.jar
Export-Package: net.opengis.filter.v_1_0_0,
wmts-v_1_0_0-schema-1.0.3.1.jar,
filter-v_2_0_0-schema-1.0.4-SNAPSHOT.jar,
gml-v_3_2_1-schema-1.0.4-SNAPSHOT.jar,
ows-v_1_1_0-schema-1.0.4-SNAPSHOT.jar,
wfs-v_2_0_0-schema-1.0.0.jar,
avwx-v_1_1_1-1.0.0.jar,
cv-v_0_2_2_gml32-1.0.0.jar,
om-v_1_0_0_gml32-1.0.0.jar,
sml-v_1_0_1_gml32-1.0.0.jar,
swe-v_1_0_1_gml32-1.0.0.jar,
wx-v_1_1_1-1.0.0.jar,
filter-v_2_0_0-schema-1.0.0.jar,
ic-v_2_0-schema-1.0.3.jar,
owsnt-v_1_1_0.jar,
ws-notification-schema-1.0.4.jar,
ws-addressing-schema-1.0.4.jar,
owsnt-v_1_1_0-1.0.0.jar,
gml-v_3_1_1-schema-1.1.0.jar,
wcs-v_1_1_2-schema-1.1.0.jar
Export-Package: com.eurocontrol.avwx.v_1_1_1,
com.eurocontrol.wx.v_1_1_1,
net.oasis.wsn.b2,
net.oasis.wsn.bf2,
net.oasis.wsn.br2,
net.oasis.wsn.t1,
net.opengis.cv.v_0_2_2_gml32,
net.opengis.filter.v_1_0_0,
net.opengis.filter.v_1_1_0,
net.opengis.filter.v_2_0_0,
net.opengis.gml.v_2_1_2,
net.opengis.gml.v_3_1_1,
net.opengis.gml.v_3_2_1,
net.opengis.kml.v_2_2_0,
net.opengis.om.v_1_0_0_gml32,
net.opengis.ows.v_1_0_0,
net.opengis.ows.v_1_1_0,
net.opengis.owsnt.v1,
net.opengis.se.v_1_1_0,
net.opengis.sensorml.v_1_0_1_gml32,
net.opengis.sld.v_1_0_0,
net.opengis.sld.v_1_1_0,
net.opengis.swe.v_1_0_1_gml32,
net.opengis.wcs.v_1_1_2,
net.opengis.wfs.v_1_1_0,
net.opengis.wfs.v_2_0_0,
net.opengis.wms.v_1_3_0,
net.opengis.wmts.v_1_0_0,
oasis.names.tc.ciq.xsdschema.xal._2,
@ -40,5 +69,7 @@ Export-Package: net.opengis.filter.v_1_0_0,
org.jvnet.jaxb2_commons.xml.bind,
org.jvnet.jaxb2_commons.xml.bind.annotation.adapters,
org.w3.smil.v_2_0,
org.w3.smil.v_2_0.language
org.w3.smil.v_2_0.language,
org.w3c.ws_addressing,
us.gov.ic.ism.v_2_0
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

Binary file not shown.

View file

@ -3,15 +3,28 @@ bin.includes = META-INF/,\
filter-v_1_0_0-schema-1.0.2.jar,\
filter-v_1_1_0-schema-1.0.2.jar,\
gml-v_2_1_2-schema-1.0.2.jar,\
gml-v_3_1_1-schema-1.0.2.jar,\
jaxb2-basics-runtime-0.6.0.jar,\
kml-v_2_2_0-schema-1.0.3.jar,\
ows-v_1_0_0-schema-1.0.2.jar,\
ows-v_1_1_0-schema-1.0.2.jar,\
se-v_1_1_0-schema-1.0.2.jar,\
sld-v_1_0_0-schema-1.0.2.jar,\
sld-v_1_1_0-schema-1.0.2.jar,\
wcs-v_1_1_2-schema-1.0.2.jar,\
wfs-v_1_1_0-schema-1.0.2.jar,\
wms-v_1_3_0-schema-1.0.2.jar,\
wmts-v_1_0_0-schema-1.0.3.1.jar
wmts-v_1_0_0-schema-1.0.3.1.jar,\
gml-v_3_2_1-schema-1.0.4-SNAPSHOT.jar,\
ows-v_1_1_0-schema-1.0.4-SNAPSHOT.jar,\
wfs-v_2_0_0-schema-1.0.0.jar,\
avwx-v_1_1_1-1.0.0.jar,\
cv-v_0_2_2_gml32-1.0.0.jar,\
om-v_1_0_0_gml32-1.0.0.jar,\
sml-v_1_0_1_gml32-1.0.0.jar,\
swe-v_1_0_1_gml32-1.0.0.jar,\
wx-v_1_1_1-1.0.0.jar,\
filter-v_2_0_0-schema-1.0.0.jar,\
ic-v_2_0-schema-1.0.3.jar,\
ws-notification-schema-1.0.4.jar,\
ws-addressing-schema-1.0.4.jar,\
owsnt-v_1_1_0-1.0.0.jar,\
gml-v_3_1_1-schema-1.1.0.jar,\
wcs-v_1_1_2-schema-1.1.0.jar,\
ows-v_1_0_0-schema-1.0.2.jar

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="org.w3.XMLSchema.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.w3.XMLSchema</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Wed Oct 10 14:13:24 CDT 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: XMLSchema
Bundle-SymbolicName: org.w3.XMLSchema
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: org.w3.XMLSchema.jar
Export-Package: org.w3.xmlschema

View file

@ -0,0 +1,3 @@
bin.includes = META-INF/,\
.,\
org.w3.XMLSchema.jar

Binary file not shown.

View file

@ -330,9 +330,15 @@
<include>request-router.xml</include>
<include>utility-request.xml</include>
<include>dpa-datadelivery.xml</include>
<!-- Don't want this for DPA, we don't need a local registry -->
<exclude>harvester-datadelivery-standalone.xml</exclude>
<!-- OGC/DPA services -->
<include>ogc-common.xml</include>
<include>.*-ogc-request.xml</include>
<include>.*-ogc-rest-request.xml</include>
<include>.*-ogc-soap-request.xml</include>
<include>.*-ogc-soap-wsdl.xml</include>
<!-- Purge OGC/DPA registred plugins -->
<include>purge-spring.xml</include>
<include>purge-spring-impl.xml</include>
@ -342,10 +348,10 @@
<mode name="dataprovideragent">
<includeMode>dataProviderAgentTemplate</includeMode>
<!-- pointdata/madis specific services -->
<include>madis-common.xml</include>
<include>pointdata-common.xml</include>
<include>madis-dpa-ingest.xml</include>
<include>madis-common.xml</include>
<include>madis-ogc.xml</include>
<include>madis-ogc-registry.xml</include>
<!-- pointdata/obs specific services
<include>obs-common.xml</include>
<include>pointdata-common.xml</include>

View file

@ -21,7 +21,7 @@
export INIT_MEM=512 # in Meg
export MAX_MEM=1536 # in Meg
export MAX_PERM_SIZE=192m
export METADATA_POOL_MIN=10
export EDEX_DEBUG_PORT=5010
export EDEX_JMX_PORT=1621

View file

@ -1,3 +1,2 @@
com.raytheon.uf.common.datadelivery.event.notification.NotificationRecord
com.raytheon.uf.common.datadelivery.event.status.DataDeliverySystemStatus
com.raytheon.uf.common.datadelivery.event.status.SystemStatusRequest

View file

@ -0,0 +1,262 @@
<!-- ====================
This is a colormap file that is read via JaXB to marshel the ColorMap class.
======================-->
<colorMap>
<!-- <color r="0" g="0" b="0" a="1" /> -->
<color r="1" g="1" b="1" a="0" />
<color r="0" g="0" b="0" a="1" />
<color r="0" g="0" b="0" a="1" />
<color r="0.00784313725490196" g="0.00784313725490196" b="0.00784313725490196" a="1" />
<color r="0.00784313725490196" g="0.00784313725490196" b="0.00784313725490196" a="1" />
<color r="0.0196078431372549" g="0.0196078431372549" b="0.0196078431372549" a="1" />
<color r="0.0235294117647059" g="0.0235294117647059" b="0.0235294117647059" a="1" />
<color r="0.0313725490196078" g="0.0313725490196078" b="0.0313725490196078" a="1" />
<color r="0.0352941176470588" g="0.0352941176470588" b="0.0352941176470588" a="1" />
<color r="0.0392156862745098" g="0.0392156862745098" b="0.0392156862745098" a="1" />
<color r="0.0470588235294118" g="0.0470588235294118" b="0.0470588235294118" a="1" />
<color r="0.0549019607843137" g="0.0549019607843137" b="0.0549019607843137" a="1" />
<color r="0.0549019607843137" g="0.0549019607843137" b="0.0549019607843137" a="1" />
<color r="0.0666666666666667" g="0.0666666666666667" b="0.0666666666666667" a="1" />
<color r="0.0666666666666667" g="0.0666666666666667" b="0.0666666666666667" a="1" />
<color r="0.0784313725490196" g="0.0784313725490196" b="0.0784313725490196" a="1" />
<color r="0.0823529411764706" g="0.0823529411764706" b="0.0823529411764706" a="1" />
<color r="0.0901960784313725" g="0.0901960784313725" b="0.0901960784313725" a="1" />
<color r="0.0941176470588235" g="0.0941176470588235" b="0.0941176470588235" a="1" />
<color r="0.0980392156862745" g="0.0980392156862745" b="0.0980392156862745" a="1" />
<color r="0.105882352941176" g="0.105882352941176" b="0.105882352941176" a="1" />
<color r="0.113725490196078" g="0.113725490196078" b="0.113725490196078" a="1" />
<color r="0.113725490196078" g="0.113725490196078" b="0.113725490196078" a="1" />
<color r="0.125490196078431" g="0.125490196078431" b="0.125490196078431" a="1" />
<color r="0.125490196078431" g="0.125490196078431" b="0.125490196078431" a="1" />
<color r="0.137254901960784" g="0.137254901960784" b="0.137254901960784" a="1" />
<color r="0.141176470588235" g="0.141176470588235" b="0.141176470588235" a="1" />
<color r="0.149019607843137" g="0.149019607843137" b="0.149019607843137" a="1" />
<color r="0.152941176470588" g="0.152941176470588" b="0.152941176470588" a="1" />
<color r="0.156862745098039" g="0.156862745098039" b="0.156862745098039" a="1" />
<color r="0.164705882352941" g="0.164705882352941" b="0.164705882352941" a="1" />
<color r="0.172549019607843" g="0.172549019607843" b="0.172549019607843" a="1" />
<color r="0.172549019607843" g="0.172549019607843" b="0.172549019607843" a="1" />
<color r="0.184313725490196" g="0.184313725490196" b="0.184313725490196" a="1" />
<color r="0.184313725490196" g="0.184313725490196" b="0.184313725490196" a="1" />
<color r="0.196078431372549" g="0.196078431372549" b="0.196078431372549" a="1" />
<color r="0.2" g="0.2" b="0.2" a="1" />
<color r="0.207843137254902" g="0.207843137254902" b="0.207843137254902" a="1" />
<color r="0.211764705882353" g="0.211764705882353" b="0.211764705882353" a="1" />
<color r="0.215686274509804" g="0.215686274509804" b="0.215686274509804" a="1" />
<color r="0.223529411764706" g="0.223529411764706" b="0.223529411764706" a="1" />
<color r="0.231372549019608" g="0.231372549019608" b="0.231372549019608" a="1" />
<color r="0.231372549019608" g="0.231372549019608" b="0.231372549019608" a="1" />
<color r="0.243137254901961" g="0.243137254901961" b="0.243137254901961" a="1" />
<color r="0.243137254901961" g="0.243137254901961" b="0.243137254901961" a="1" />
<color r="0.254901960784314" g="0.254901960784314" b="0.254901960784314" a="1" />
<color r="0.258823529411765" g="0.258823529411765" b="0.258823529411765" a="1" />
<color r="0.266666666666667" g="0.266666666666667" b="0.266666666666667" a="1" />
<color r="0.270588235294118" g="0.270588235294118" b="0.270588235294118" a="1" />
<color r="0.274509803921569" g="0.274509803921569" b="0.274509803921569" a="1" />
<color r="0.282352941176471" g="0.282352941176471" b="0.282352941176471" a="1" />
<color r="0.290196078431373" g="0.290196078431373" b="0.290196078431373" a="1" />
<color r="0.290196078431373" g="0.290196078431373" b="0.290196078431373" a="1" />
<color r="0.301960784313725" g="0.301960784313725" b="0.301960784313725" a="1" />
<color r="0.301960784313725" g="0.301960784313725" b="0.301960784313725" a="1" />
<color r="0.313725490196078" g="0.313725490196078" b="0.313725490196078" a="1" />
<color r="0.317647058823529" g="0.317647058823529" b="0.317647058823529" a="1" />
<color r="0.325490196078431" g="0.325490196078431" b="0.325490196078431" a="1" />
<color r="0.333333333333333" g="0.333333333333333" b="0.333333333333333" a="1" />
<color r="0.333333333333333" g="0.333333333333333" b="0.333333333333333" a="1" />
<color r="0.345098039215686" g="0.345098039215686" b="0.345098039215686" a="1" />
<color r="0.349019607843137" g="0.349019607843137" b="0.349019607843137" a="1" />
<color r="0.356862745098039" g="0.356862745098039" b="0.356862745098039" a="1" />
<color r="0.36078431372549" g="0.36078431372549" b="0.36078431372549" a="1" />
<color r="0.368627450980392" g="0.368627450980392" b="0.368627450980392" a="1" />
<color r="0.372549019607843" g="0.372549019607843" b="0.372549019607843" a="1" />
<color r="0.376470588235294" g="0.376470588235294" b="0.376470588235294" a="1" />
<color r="0.384313725490196" g="0.384313725490196" b="0.384313725490196" a="1" />
<color r="0.392156862745098" g="0.392156862745098" b="0.392156862745098" a="1" />
<color r="0.392156862745098" g="0.392156862745098" b="0.392156862745098" a="1" />
<color r="0.403921568627451" g="0.403921568627451" b="0.403921568627451" a="1" />
<color r="0.407843137254902" g="0.407843137254902" b="0.407843137254902" a="1" />
<color r="0.415686274509804" g="0.415686274509804" b="0.415686274509804" a="1" />
<color r="0.419607843137255" g="0.419607843137255" b="0.419607843137255" a="1" />
<color r="0.427450980392157" g="0.427450980392157" b="0.427450980392157" a="1" />
<color r="0.431372549019608" g="0.431372549019608" b="0.431372549019608" a="1" />
<color r="0.435294117647059" g="0.435294117647059" b="0.435294117647059" a="1" />
<color r="0.443137254901961" g="0.443137254901961" b="0.443137254901961" a="1" />
<color r="0.450980392156863" g="0.450980392156863" b="0.450980392156863" a="1" />
<color r="0.450980392156863" g="0.450980392156863" b="0.450980392156863" a="1" />
<color r="0.462745098039216" g="0.462745098039216" b="0.462745098039216" a="1" />
<color r="0.466666666666667" g="0.466666666666667" b="0.466666666666667" a="1" />
<color r="0.474509803921569" g="0.474509803921569" b="0.474509803921569" a="1" />
<color r="0.47843137254902" g="0.47843137254902" b="0.47843137254902" a="1" />
<color r="0.486274509803922" g="0.486274509803922" b="0.486274509803922" a="1" />
<color r="0.490196078431373" g="0.490196078431373" b="0.490196078431373" a="1" />
<color r="0.494117647058824" g="0.494117647058824" b="0.494117647058824" a="1" />
<color r="0.501960784313725" g="0.501960784313725" b="0.501960784313725" a="1" />
<color r="0.509803921568627" g="0.509803921568627" b="0.509803921568627" a="1" />
<color r="0.509803921568627" g="0.509803921568627" b="0.509803921568627" a="1" />
<color r="0.52156862745098" g="0.52156862745098" b="0.52156862745098" a="1" />
<color r="0.525490196078431" g="0.525490196078431" b="0.525490196078431" a="1" />
<color r="0.533333333333333" g="0.533333333333333" b="0.533333333333333" a="1" />
<color r="0.537254901960784" g="0.537254901960784" b="0.537254901960784" a="1" />
<color r="0.545098039215686" g="0.545098039215686" b="0.545098039215686" a="1" />
<color r="0.549019607843137" g="0.549019607843137" b="0.549019607843137" a="1" />
<color r="0.552941176470588" g="0.552941176470588" b="0.552941176470588" a="1" />
<color r="0.56078431372549" g="0.56078431372549" b="0.56078431372549" a="1" />
<color r="0.568627450980392" g="0.568627450980392" b="0.568627450980392" a="1" />
<color r="0.568627450980392" g="0.568627450980392" b="0.568627450980392" a="1" />
<color r="0.580392156862745" g="0.580392156862745" b="0.580392156862745" a="1" />
<color r="0.584313725490196" g="0.584313725490196" b="0.584313725490196" a="1" />
<color r="0.592156862745098" g="0.592156862745098" b="0.592156862745098" a="1" />
<color r="0.596078431372549" g="0.596078431372549" b="0.596078431372549" a="1" />
<color r="0.603921568627451" g="0.603921568627451" b="0.603921568627451" a="1" />
<color r="0.607843137254902" g="0.607843137254902" b="0.607843137254902" a="1" />
<color r="0.611764705882353" g="0.611764705882353" b="0.611764705882353" a="1" />
<color r="0.619607843137255" g="0.619607843137255" b="0.619607843137255" a="1" />
<color r="0.627450980392157" g="0.627450980392157" b="0.627450980392157" a="1" />
<color r="0.627450980392157" g="0.627450980392157" b="0.627450980392157" a="1" />
<color r="0.63921568627451" g="0.63921568627451" b="0.63921568627451" a="1" />
<color r="0.643137254901961" g="0.643137254901961" b="0.643137254901961" a="1" />
<color r="0.650980392156863" g="0.650980392156863" b="0.650980392156863" a="1" />
<color r="0.654901960784314" g="0.654901960784314" b="0.654901960784314" a="1" />
<color r="0.662745098039216" g="0.662745098039216" b="0.662745098039216" a="1" />
<color r="0.670588235294118" g="0.670588235294118" b="0.670588235294118" a="1" />
<color r="0.670588235294118" g="0.670588235294118" b="0.670588235294118" a="1" />
<color r="0.682352941176471" g="0.682352941176471" b="0.682352941176471" a="1" />
<color r="0.682352941176471" g="0.682352941176471" b="0.682352941176471" a="1" />
<color r="0.686274509803922" g="0.686274509803922" b="0.686274509803922" a="1" />
<color r="0.694117647058824" g="0.694117647058824" b="0.694117647058824" a="1" />
<color r="0.698039215686274" g="0.698039215686274" b="0.698039215686274" a="1" />
<color r="0.701960784313725" g="0.701960784313725" b="0.701960784313725" a="1" />
<color r="0.709803921568627" g="0.709803921568627" b="0.709803921568627" a="1" />
<color r="0.713725490196078" g="0.713725490196078" b="0.713725490196078" a="1" />
<color r="0.725490196078431" g="0.725490196078431" b="0.725490196078431" a="1" />
<color r="0.725490196078431" g="0.725490196078431" b="0.725490196078431" a="1" />
<color r="0.737254901960784" g="0.737254901960784" b="0.737254901960784" a="1" />
<color r="0.741176470588235" g="0.741176470588235" b="0.741176470588235" a="1" />
<color r="0.745098039215686" g="0.745098039215686" b="0.745098039215686" a="1" />
<color r="0.752941176470588" g="0.752941176470588" b="0.752941176470588" a="1" />
<color r="0.756862745098039" g="0.756862745098039" b="0.756862745098039" a="1" />
<color r="0.76078431372549" g="0.76078431372549" b="0.76078431372549" a="1" />
<color r="0.768627450980392" g="0.768627450980392" b="0.768627450980392" a="1" />
<color r="0.772549019607843" g="0.772549019607843" b="0.772549019607843" a="1" />
<color r="0.784313725490196" g="0.784313725490196" b="0.784313725490196" a="1" />
<color r="0.784313725490196" g="0.784313725490196" b="0.784313725490196" a="1" />
<color r="0.796078431372549" g="0.796078431372549" b="0.796078431372549" a="1" />
<color r="0.8" g="0.8" b="0.8" a="1" />
<color r="0.803921568627451" g="0.803921568627451" b="0.803921568627451" a="1" />
<color r="0.811764705882353" g="0.811764705882353" b="0.811764705882353" a="1" />
<color r="0.815686274509804" g="0.815686274509804" b="0.815686274509804" a="1" />
<color r="0.819607843137255" g="0.819607843137255" b="0.819607843137255" a="1" />
<color r="0.827450980392157" g="0.827450980392157" b="0.827450980392157" a="1" />
<color r="0.831372549019608" g="0.831372549019608" b="0.831372549019608" a="1" />
<color r="0.843137254901961" g="0.843137254901961" b="0.843137254901961" a="1" />
<color r="0.843137254901961" g="0.843137254901961" b="0.843137254901961" a="1" />
<color r="0.854901960784314" g="0.854901960784314" b="0.854901960784314" a="1" />
<color r="0.858823529411765" g="0.858823529411765" b="0.858823529411765" a="1" />
<color r="0.862745098039216" g="0.862745098039216" b="0.862745098039216" a="1" />
<color r="0.870588235294118" g="0.870588235294118" b="0.870588235294118" a="1" />
<color r="0.874509803921569" g="0.874509803921569" b="0.874509803921569" a="1" />
<color r="0.87843137254902" g="0.87843137254902" b="0.87843137254902" a="1" />
<color r="0.886274509803922" g="0.886274509803922" b="0.886274509803922" a="1" />
<color r="0.890196078431372" g="0.890196078431372" b="0.890196078431372" a="1" />
<color r="0.901960784313726" g="0.901960784313726" b="0.901960784313726" a="1" />
<color r="0.901960784313726" g="0.901960784313726" b="0.901960784313726" a="1" />
<color r="0.913725490196078" g="0.913725490196078" b="0.913725490196078" a="1" />
<color r="0.917647058823529" g="0.917647058823529" b="0.917647058823529" a="1" />
<color r="0.92156862745098" g="0.92156862745098" b="0.92156862745098" a="1" />
<color r="0.929411764705882" g="0.929411764705882" b="0.929411764705882" a="1" />
<color r="0.933333333333333" g="0.933333333333333" b="0.933333333333333" a="1" />
<color r="0.937254901960784" g="0.937254901960784" b="0.937254901960784" a="1" />
<color r="0.945098039215686" g="0.945098039215686" b="0.945098039215686" a="1" />
<color r="0.949019607843137" g="0.949019607843137" b="0.949019607843137" a="1" />
<color r="0.96078431372549" g="0.96078431372549" b="0.96078431372549" a="1" />
<color r="0.96078431372549" g="0.96078431372549" b="0.96078431372549" a="1" />
<color r="0.972549019607843" g="0.972549019607843" b="0.972549019607843" a="1" />
<color r="0.976470588235294" g="0.976470588235294" b="0.976470588235294" a="1" />
<color r="0.980392156862745" g="0.980392156862745" b="0.980392156862745" a="1" />
<color r="0.972549019607843" g="0.949019607843137" b="0" a="1" />
<color r="0.933333333333333" g="0.913725490196078" b="0" a="1" />
<color r="0.890196078431372" g="0.874509803921569" b="0" a="1" />
<color r="0.847058823529412" g="0.831372549019608" b="0" a="1" />
<color r="0.803921568627451" g="0.796078431372549" b="0" a="1" />
<color r="0.768627450980392" g="0.756862745098039" b="0" a="1" />
<color r="0.72156862745098" g="0.713725490196078" b="0" a="1" />
<color r="0.682352941176471" g="0.67843137254902" b="0" a="1" />
<color r="0.650980392156863" g="0.63921568627451" b="0" a="1" />
<color r="0.611764705882353" g="0.607843137254902" b="0" a="1" />
<color r="0.576470588235294" g="0.564705882352941" b="0" a="1" />
<color r="0.533333333333333" g="0.52156862745098" b="0" a="1" />
<color r="0.490196078431373" g="0.486274509803922" b="0" a="1" />
<color r="0.450980392156863" g="0.447058823529412" b="0" a="1" />
<color r="0.407843137254902" g="0.4" b="0" a="1" />
<color r="0.372549019607843" g="0.356862745098039" b="0" a="1" />
<color r="0.564705882352941" g="0" b="0" a="1" />
<color r="0.607843137254902" g="0" b="0" a="1" />
<color r="0.643137254901961" g="0" b="0" a="1" />
<color r="0.682352941176471" g="0" b="0" a="1" />
<color r="0.713725490196078" g="0" b="0" a="1" />
<color r="0.756862745098039" g="0" b="0" a="1" />
<color r="0.8" g="0" b="0" a="1" />
<color r="0.83921568627451" g="0" b="0" a="1" />
<color r="0.886274509803922" g="0" b="0" a="1" />
<color r="0.929411764705882" g="0" b="0" a="1" />
<color r="0.949019607843137" g="0" b="0.972549019607843" a="1" />
<color r="0.905882352941176" g="0" b="0.92156862745098" a="1" />
<color r="0.858823529411765" g="0" b="0.874509803921569" a="1" />
<color r="0.815686274509804" g="0" b="0.831372549019608" a="1" />
<color r="0.768627450980392" g="0" b="0.780392156862745" a="1" />
<color r="0.713725490196078" g="0" b="0.737254901960784" a="1" />
<color r="0.67843137254902" g="0" b="0.682352941176471" a="1" />
<color r="0.635294117647059" g="0" b="0.650980392156863" a="1" />
<color r="0.592156862745098" g="0" b="0.607843137254902" a="1" />
<color r="0.549019607843137" g="0" b="0.552941176470588" a="1" />
<color r="0" g="0.372549019607843" b="0.564705882352941" a="1" />
<color r="0" g="0.415686274509804" b="0.592156862745098" a="1" />
<color r="0" g="0.458823529411765" b="0.611764705882353" a="1" />
<color r="0" g="0.494117647058824" b="0.63921568627451" a="1" />
<color r="0" g="0.545098039215686" b="0.666666666666667" a="1" />
<color r="0" g="0.584313725490196" b="0.682352941176471" a="1" />
<color r="0" g="0.623529411764706" b="0.709803921568627" a="1" />
<color r="0" g="0.666666666666667" b="0.737254901960784" a="1" />
<color r="0" g="0.698039215686274" b="0.756862745098039" a="1" />
<color r="0" g="0.737254901960784" b="0.788235294117647" a="1" />
<color r="0" g="0.780392156862745" b="0.815686274509804" a="1" />
<color r="0.0470588235294118" g="0.972549019607843" b="0" a="1" />
<color r="0.0392156862745098" g="0.917647058823529" b="0" a="1" />
<color r="0.0352941176470588" g="0.862745098039216" b="0" a="1" />
<color r="0.0352941176470588" g="0.811764705882353" b="0" a="1" />
<color r="0.0235294117647059" g="0.756862745098039" b="0" a="1" />
<color r="0.0196078431372549" g="0.698039215686274" b="0" a="1" />
<color r="0.0196078431372549" g="0.650980392156863" b="0" a="1" />
<color r="0.0156862745098039" g="0.607843137254902" b="0" a="1" />
<color r="0.00392156862745098" g="0.549019607843137" b="0" a="1" />
<color r="0.00392156862745098" g="0.494117647058824" b="0" a="1" />
<color r="0" g="0.435294117647059" b="0" a="1" />
<color r="0.0235294117647059" g="0" b="0" a="1" />
<color r="0.141176470588235" g="0.105882352941176" b="0.105882352941176" a="1" />
<color r="0.258823529411765" g="0.231372549019608" b="0.231372549019608" a="1" />
<color r="0.376470588235294" g="0.356862745098039" b="0.356862745098039" a="1" />
<color r="0.505882352941176" g="0.486274509803922" b="0.486274509803922" a="1" />
<color r="0.623529411764706" g="0.607843137254902" b="0.607843137254902" a="1" />
<color r="0.729411764705882" g="0.713725490196078" b="0.713725490196078" a="1" />
<color r="0.847058823529412" g="0.847058823529412" b="0.847058823529412" a="1" />
<color r="0.00392156862745098" g="0" b="0.972549019607843" a="1" />
<color r="0.00392156862745098" g="0" b="0.905882352941176" a="1" />
<color r="0.00392156862745098" g="0" b="0.83921568627451" a="1" />
<color r="0.00392156862745098" g="0" b="0.772549019607843" a="1" />
<color r="0" g="0" b="0.713725490196078" a="1" />
<color r="0" g="0" b="0.650980392156863" a="1" />
<color r="0" g="0" b="0.592156862745098" a="1" />
<color r="0" g="0" b="0.533333333333333" a="1" />
<color r="0" g="0" b="0.466666666666667" a="1" />
<color r="0" g="0" b="0.4" a="1" />
<color r="0.972549019607843" g="0" b="0.466666666666667" a="1" />
<color r="0.858823529411765" g="0" b="0.415686274509804" a="1" />
<color r="0.752941176470588" g="0" b="0.356862745098039" a="1" />
<color r="0.650980392156863" g="0" b="0.309803921568627" a="1" />
<color r="0.545098039215686" g="0" b="0.254901960784314" a="1" />
<color r="0.431372549019608" g="0" b="0.2" a="1" />
<color r="0.317647058823529" g="0" b="0.141176470588235" a="1" />
<color r="0.211764705882353" g="0" b="0.0941176470588235" a="1" />
<color r="0.0980392156862745" g="0" b="0.0392156862745098" a="1" />
<color r="1" g="1" b="1" a="1" />
</colorMap>

View file

@ -7,10 +7,10 @@ Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.codehaus.jackson;bundle-version="1.7.3",
org.geotools;bundle-version="2.6.4",
org.apache.commons.pool;bundle-version="1.3.0"
org.apache.commons.pool;bundle-version="1.3.0",
com.raytheon.uf.common.status;bundle-version="1.12.1174"
Export-Package: com.raytheon.uf.common.json,
com.raytheon.uf.common.json.geo,
com.raytheon.uf.common.json.impl,
com.raytheon.uf.common.json.jackson,
com.raytheon.uf.common.json.jackson.util
Import-Package: org.apache.commons.logging

View file

@ -33,14 +33,14 @@ import java.io.OutputStream;
import java.util.Map;
import java.util.TreeMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.ObjectWriter;
import com.raytheon.uf.common.json.JsonException;
import com.raytheon.uf.common.json.JsonService;
import com.raytheon.uf.common.json.jackson.JacksonPool;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
/**
* @author bclement
@ -50,7 +50,7 @@ public class JsonSrvImpl implements JsonService {
private JacksonPool pool;
private Log log = LogFactory.getLog(this.getClass());
private IUFStatusHandler log = UFStatus.getHandler(this.getClass());
public JsonSrvImpl() {
pool = new JacksonPool();

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.uf.common.nc4</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Tue Mar 05 10:11:29 CST 2013
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Nc4
Bundle-SymbolicName: com.raytheon.uf.common.nc4
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.raytheon.uf.common.nc4,
com.raytheon.uf.common.nc4.cf
Require-Bundle: ll.netcdf;bundle-version="1.0.0",
org.apache.commons.lang;bundle-version="2.3.0",
com.raytheon.uf.common.status;bundle-version="1.12.1174"

View file

@ -0,0 +1,2 @@
central_meridian=longitude_of_central_meridian
latitude_of_origin=latitude_of_projection_origin

View file

@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
bin/

View file

@ -0,0 +1,229 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4;
import java.util.Arrays;
import org.apache.commons.lang.ArrayUtils;
import edu.mit.ll.netcdf.LLNetcdfAttrJNI;
import edu.mit.ll.netcdf.LLNetcdfException;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 7, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public abstract class NcBase {
protected int fileId;
protected int varId;
protected final LLNetcdfAttrJNI attrs = new LLNetcdfAttrJNI();
protected void init(int fileId, int varId) {
this.fileId = fileId;
this.varId = varId;
}
/**
* Add attribute. This method can only be called when file is in define mode
* before {@link Netcdf#endFileDefinition()} is called.
*
* @param name
* name of attribute
* @param value
* value of attribute
* @throws NetcdfException
*/
public void putBytesAttribute(String name, byte[] value)
throws NetcdfException {
try {
attrs.writeByteArrayAttr(fileId, varId, name, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Add attribute. This method can only be called when file is in define mode
* before {@link Netcdf#endFileDefinition()} is called.
*
* @param name
* name of attribute
* @param value
* value of attribute
* @throws NetcdfException
*/
public void putStringAttribute(String name, String value)
throws NetcdfException {
try {
attrs.writeStringAttr(fileId, varId, name, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Add attribute. This method can only be called when file is in define mode
* before {@link Netcdf#endFileDefinition()} is called.
*
* @param name
* name of attribute
* @param value
* value of attribute
* @throws NetcdfException
*/
public void putStringsAttribute(String name, String[] value)
throws NetcdfException {
try {
attrs.writeStringArrayAttr(fileId, varId, name, value.length, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Add attribute. This method can only be called when file is in define mode
* before {@link Netcdf#endFileDefinition()} is called.
*
* @param name
* name of attribute
* @param value
* value of attribute
* @throws NetcdfException
*/
public void putFloatsAttribute(String name, float[] value)
throws NetcdfException {
try {
attrs.writeFloatArrayAttr(fileId, varId, name, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Add attribute. This method can only be called when file is in define mode
* before {@link Netcdf#endFileDefinition()} is called.
*
* @param name
* name of attribute
* @param value
* value of attribute
* @throws NetcdfException
*/
public void putDoublesAttribute(String name, double[] value)
throws NetcdfException {
try {
attrs.writeDoubleArrayAttr(fileId, varId, name, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Add attribute. This method can only be called when file is in define mode
* before {@link Netcdf#endFileDefinition()} is called.
*
* @param name
* name of attribute
* @param value
* value of attribute
* @throws NetcdfException
*/
public void putShortsAttribute(String name, short[] value)
throws NetcdfException {
try {
attrs.writeShortArrayAttr(fileId, varId, name, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Add attribute. This method can only be called when file is in define mode
* before {@link Netcdf#endFileDefinition()} is called.
*
* @param name
* name of attribute
* @param value
* value of attribute
* @throws NetcdfException
*/
public void putIntsAttribute(String name, int[] value)
throws NetcdfException {
try {
attrs.writeIntegerArrayAttr(fileId, varId, name, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Add attribute. This method can only be called when file is in define mode
* before {@link Netcdf#endFileDefinition()} is called.
*
* @param name
* @param value
* @throws NetcdfException
*/
public void putNumberAttribute(String name, Number[] value)
throws NetcdfException {
if (value.length < 1) {
throw new NetcdfException("Unable to write empty attribute array");
}
Class<?> c = value[0].getClass();
if (c.equals(Byte.class)) {
Byte[] tmp = Arrays.copyOf(value, value.length, Byte[].class);
putBytesAttribute(name, ArrayUtils.toPrimitive((tmp)));
} else if (c.equals(Short.class)) {
Short[] tmp = Arrays.copyOf(value, value.length, Short[].class);
putShortsAttribute(name, ArrayUtils.toPrimitive((tmp)));
} else if (c.equals(Integer.class)) {
Integer[] tmp = Arrays.copyOf(value, value.length, Integer[].class);
putIntsAttribute(name, ArrayUtils.toPrimitive((tmp)));
} else if (c.equals(Float.class)) {
Float[] tmp = Arrays.copyOf(value, value.length, Float[].class);
putFloatsAttribute(name, ArrayUtils.toPrimitive((tmp)));
} else if (c.equals(Double.class)) {
Double[] tmp = Arrays.copyOf(value, value.length, Double[].class);
putDoublesAttribute(name, ArrayUtils.toPrimitive((tmp)));
} else {
throw new NetcdfException("Unable to write attribute of type: " + c);
}
}
/**
* @return the fileId
*/
public int getFileId() {
return fileId;
}
/**
* @return the varId
*/
public int getVarId() {
return varId;
}
}

View file

@ -0,0 +1,495 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* Constants used in Netcdf library
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 5, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class NcConstants {
public static final Map<Integer, String> ERROR_MAP;
/** Attribute id to put/get a global attribute. */
public static final int NC_GLOBAL = -1;
/** No Error */
public static final int NC_NOERR = 0;
/** Returned for all errors in the v2 API. */
public static final int NC2_ERR = (-1);
/**
* Not a netcdf id.
*
* The specified netCDF ID does not refer to an open netCDF dataset.
*/
public static final int NC_EBADID = (-33);
/** Too many netcdfs open */
public static final int NC_ENFILE = (-34);
/** netcdf file exists && NC_NOCLOBBER */
public static final int NC_EEXIST = (-35);
/** Invalid Argument */
public static final int NC_EINVAL = (-36);
/** Write to read only */
public static final int NC_EPERM = (-37);
/**
* Operation not allowed in data mode. This is returned for netCDF classic
* or 64-bit offset files, or for netCDF-4 files, when they have been
* created with ::NC_CLASSIC_MODEL flag in nc_create().
*/
public static final int NC_ENOTINDEFINE = (-38);
/**
* Operation not allowed in define mode.
*
* The specified netCDF is in define mode rather than data mode.
*
* With netCDF-4/HDF5 files, this error will not occur, unless
* ::NC_CLASSIC_MODEL was used in nc_create().
*/
public static final int NC_EINDEFINE = (-39);
/**
* Index exceeds dimension bound.
*
* The specified corner indices were out of range for the rank of the
* specified variable. For example, a negative index or an index that is
* larger than the corresponding dimension length will cause an error.
*/
public static final int NC_EINVALCOORDS = (-40);
/** NC_MAX_DIMS exceeded */
public static final int NC_EMAXDIMS = (-41);
/** String match to name in use */
public static final int NC_ENAMEINUSE = (-42);
/** Attribute not found */
public static final int NC_ENOTATT = (-43);
/** NC_MAX_ATTRS exceeded */
public static final int NC_EMAXATTS = (-44);
/** Not a netcdf data type */
public static final int NC_EBADTYPE = (-45);
/** Invalid dimension id or name */
public static final int NC_EBADDIM = (-46);
/** NC_UNLIMITED in the wrong index */
public static final int NC_EUNLIMPOS = (-47);
/**
* NC_MAX_VARS exceeded. Max number of variables exceeded in a classic or
* 64-bit offset file, or an netCDF-4 file with ::NC_CLASSIC_MODEL on.
*/
public static final int NC_EMAXVARS = (-48);
/**
* Variable not found. The variable ID is invalid for the specified netCDF
* dataset.
*/
public static final int NC_ENOTVAR = (-49);
/** Action prohibited on NC_GLOBAL varid */
public static final int NC_EGLOBAL = (-50);
/** Not a netcdf file */
public static final int NC_ENOTNC = (-51);
/** In Fortran, string too short */
public static final int NC_ESTS = (-52);
/** NC_MAX_NAME exceeded */
public static final int NC_EMAXNAME = (-53);
/** NC_UNLIMITED size already in use */
public static final int NC_EUNLIMIT = (-54);
/** nc_rec op when there are no record vars */
public static final int NC_ENORECVARS = (-55);
/** Attempt to convert between text & numbers */
public static final int NC_ECHAR = (-56);
/** Start+count exceeds dimension bound.
The specified edge lengths added to the specified corner would have
referenced data out of range for the rank of the specified
variable. For example, an edge length that is larger than the
corresponding dimension length minus the corner index will cause an
error. */
public static final int NC_EEDGE = (-57);
/** Illegal stride */
public static final int NC_ESTRIDE = (-58);
/** Attribute or variable name contains illegal characters */
public static final int NC_EBADNAME = (-59);
/** Math result not representable.
One or more of the values are out of the range of values representable
by the desired type. */
public static final int NC_ERANGE = (-60);
/** Memory allocation (malloc) failure */
public static final int NC_ENOMEM = (-61);
/** One or more variable sizes violate format constraints */
public static final int NC_EVARSIZE = (-62);
/** Invalid dimension size */
public static final int NC_EDIMSIZE = (-63);
/** File likely truncated or possibly corrupted */
public static final int NC_ETRUNC = (-64);
/** Unknown axis type. */
public static final int NC_EAXISTYPE = (-65);
/** Generic DAP error */
public static final int NC_EDAP = (-66);
/** Generic libcurl error */
public static final int NC_ECURL = (-67);
/** Generic IO error */
public static final int NC_EIO = (-68);
/** Attempt to access variable with no data */
public static final int NC_ENODATA = (-69);
/** DAP server error */
public static final int NC_EDAPSVC = (-70);
/** Malformed or inaccessible DAS */
public static final int NC_EDAS = (-71);
/** Malformed or inaccessible DDS */
public static final int NC_EDDS = (-72);
/** Malformed or inaccessible DATADDS */
public static final int NC_EDATADDS = (-73);
/** Malformed DAP URL */
public static final int NC_EDAPURL = (-74);
/** Malformed DAP Constraint */
public static final int NC_EDAPCONSTRAINT = (-75);
/** Untranslatable construct */
public static final int NC_ETRANSLATION = (-76);
/*
* The following was added in support of netcdf-4. Make all netcdf-4 error
* codes-100 so that errors can be added to netcdf-3 if needed.
*/
/** Error at HDF5 layer. */
public static final int NC_EHDFERR = (-101);
/** Can't read. */
public static final int NC_ECANTREAD = (-102);
/** Can't write. */
public static final int NC_ECANTWRITE = (-103);
/** Can't create. */
public static final int NC_ECANTCREATE = (-104);
/** Problem with file metadata. */
public static final int NC_EFILEMETA = (-105);
/** Problem with dimension metadata. */
public static final int NC_EDIMMETA = (-106);
/** Problem with attribute metadata. */
public static final int NC_EATTMETA = (-107);
/** Problem with variable metadata. */
public static final int NC_EVARMETA = (-108);
/** Not a compound type. */
public static final int NC_ENOCOMPOUND = (-109);
/** Attribute already exists. */
public static final int NC_EATTEXISTS = (-110);
/** Attempting netcdf-4 operation on netcdf-3 file. */
public static final int NC_ENOTNC4 = (-111);
/** Attempting netcdf-4 operation on strict nc3 netcdf-4 file. */
public static final int NC_ESTRICTNC3 = (-112);
/** Attempting netcdf-3 operation on netcdf-4 file. */
public static final int NC_ENOTNC3 = (-113);
/** Parallel operation on file opened for non-parallel access. */
public static final int NC_ENOPAR = (-114);
/** Error initializing for parallel access. */
public static final int NC_EPARINIT = (-115);
/** Bad group ID. */
public static final int NC_EBADGRPID = (-116);
/** Bad type ID. */
public static final int NC_EBADTYPID = (-117);
/** Type has already been defined and may not be edited. */
public static final int NC_ETYPDEFINED = (-118);
/** Bad field ID. */
public static final int NC_EBADFIELD = (-119);
/** Bad class. */
public static final int NC_EBADCLASS = (-120);
/** Mapped access for atomic types only. */
public static final int NC_EMAPTYPE = (-121);
/** Attempt to define fill value when data already exists. */
public static final int NC_ELATEFILL = (-122);
/** Attempt to define var properties, like deflate, after enddef. */
public static final int NC_ELATEDEF = (-123);
/** Probem with HDF5 dimscales. */
public static final int NC_EDIMSCALE = (-124);
/** No group found. */
public static final int NC_ENOGRP = (-125);
/** Can't specify both contiguous and chunking. */
public static final int NC_ESTORAGE = (-126);
/** Bad chunksize. */
public static final int NC_EBADCHUNK = (-127);
/** Attempt to use feature that was not turned on when netCDF was built. */
public static final int NC_ENOTBUILT = (-128);
/** Error in using diskless access. */
public static final int NC_EDISKLESS = (-129);
/** Set read-only access for nc_open(). */
public static final int NC_NOWRITE = 0x0000;
/** Set read-write access for nc_open(). */
public static final int NC_WRITE = 0x0001;
/** Destroy existing file. Mode flag for nc_create(). */
public static final int NC_CLOBBER = 0x0000;
/** Don't destroy existing file. Mode flag for nc_create(). */
public static final int NC_NOCLOBBER = 0x0004;
/** Use diskless file. Mode flag for nc_open() or nc_create(). */
public static final int NC_DISKLESS = 0x0008;
/** Use diskless file with mmap. Mode flag for nc_open() or nc_create(). */
public static final int NC_MMAP = 0x0010;
/** Enforce classic model. Mode flag for nc_create(). */
public static final int NC_CLASSIC_MODEL = 0x0100;
/** Use large (64-bit) file offsets. Mode flag for nc_create(). */
public static final int NC_64BIT_OFFSET = 0x0200;
/**
* deprecated The following flag currently is ignored, but use in nc_open()
* or nc_create() may someday support use of advisory locking to prevent
* multiple writers from clobbering a file
*/
public static final int NC_LOCK = 0x0400;
/** Share updates, limit cacheing.
Use this in mode flags for both nc_create() and nc_open(). */
public static final int NC_SHARE = 0x0800;
/** Use netCDF-4/HDF5 format. Mode flag for nc_create(). */
public static final int NC_NETCDF4 = 0x1000;
/** Turn on MPI I/O.
Use this in mode flags for both nc_create() and nc_open(). */
public static final int NC_MPIIO = 0x2000;
/** Turn on MPI POSIX I/O.
Use this in mode flags for both nc_create() and nc_open(). */
public static final int NC_MPIPOSIX = 0x4000;
/** Use parallel-netcdf library. Mode flag for nc_open(). */
public static final int NC_PNETCDF = 0x8000;
/**
* Let nc__create() or nc__open() figure out as suitable chunk size.
*/
public static final int NC_SIZEHINT_DEFAULT = 0;
/** signed 1 byte integer */
public static final int NC_BYTE = 1;
/** ISO/ASCII character */
public static final int NC_CHAR = 2;
/** signed 2 byte integer */
public static final int NC_SHORT = 3;
/** signed 4 byte integer */
public static final int NC_INT = 4;
/** single precision floating point number */
public static final int NC_FLOAT = 5;
/** double precision floating point number */
public static final int NC_DOUBLE = 6;
/** signed 8-byte int */
public static final int NC_INT64 = 10;
static {
HashMap<Integer, String> map = new HashMap<Integer, String>();
map.put(NC_NOERR, "No Error ");
map.put(NC2_ERR, "Returned for all errors in the v2 API. ");
map.put(NC_EBADID, "Not a netcdf id. ");
map.put(NC_ENFILE, "Too many netcdfs open ");
map.put(NC_EEXIST, "netcdf file exists && NC_NOCLOBBER ");
map.put(NC_EINVAL, "Invalid Argument ");
map.put(NC_EPERM, "Write to read only ");
map.put(NC_ENOTINDEFINE, "Operation not allowed in data mode. ");
map.put(NC_EINDEFINE, "Operation not allowed in define mode. ");
map.put(NC_EINVALCOORDS, "Index exceeds dimension bound. ");
map.put(NC_EMAXDIMS, "NC_MAX_DIMS exceeded ");
map.put(NC_ENAMEINUSE, "String match to name in use ");
map.put(NC_ENOTATT, "Attribute not found ");
map.put(NC_EMAXATTS, "NC_MAX_ATTRS exceeded ");
map.put(NC_EBADTYPE, "Not a netcdf data type ");
map.put(NC_EBADDIM, "Invalid dimension id or name ");
map.put(NC_EUNLIMPOS, "NC_UNLIMITED in the wrong index ");
map.put(NC_EMAXVARS, "NC_MAX_VARS exceeded. ");
map.put(NC_ENOTVAR, "Variable not found. ");
map.put(NC_EGLOBAL, "Action prohibited on NC_GLOBAL varid ");
map.put(NC_ENOTNC, "Not a netcdf file ");
map.put(NC_ESTS, "In Fortran, string too short ");
map.put(NC_EMAXNAME, "NC_MAX_NAME exceeded ");
map.put(NC_EUNLIMIT, "NC_UNLIMITED size already in use ");
map.put(NC_ENORECVARS, "nc_rec op when there are no record vars ");
map.put(NC_ECHAR, "Attempt to convert between text & numbers ");
map.put(NC_EEDGE, "Start+count exceeds dimension bound. ");
map.put(NC_ESTRIDE, "Illegal stride ");
map.put(NC_EBADNAME,
"Attribute or variable name contains illegal characters ");
map.put(NC_ERANGE,
"One or more of the values are out of the range of values representable by the desired type. ");
map.put(NC_ENOMEM, "Memory allocation (malloc) failure ");
map.put(NC_EVARSIZE,
"One or more variable sizes violate format constraints ");
map.put(NC_EDIMSIZE, "Invalid dimension size ");
map.put(NC_ETRUNC, "File likely truncated or possibly corrupted ");
map.put(NC_EAXISTYPE, "Unknown axis type. ");
map.put(NC_EDAP, "Generic DAP error ");
map.put(NC_ECURL, "Generic libcurl error ");
map.put(NC_EIO, "Generic IO error ");
map.put(NC_ENODATA, "Attempt to access variable with no data ");
map.put(NC_EDAPSVC, "DAP server error ");
map.put(NC_EDAS, "Malformed or inaccessible DAS ");
map.put(NC_EDDS, "Malformed or inaccessible DDS ");
map.put(NC_EDATADDS, "Malformed or inaccessible DATADDS ");
map.put(NC_EDAPURL, "Malformed DAP URL ");
map.put(NC_EDAPCONSTRAINT, "Malformed DAP Constraint");
map.put(NC_ETRANSLATION, "Untranslatable construct ");
map.put(NC_EHDFERR, "Error at HDF5 layer. ");
map.put(NC_ECANTREAD, "Can't read. ");
map.put(NC_ECANTWRITE, "Can't write. ");
map.put(NC_ECANTCREATE, "Can't create. ");
map.put(NC_EFILEMETA, "Problem with file metadata. ");
map.put(NC_EDIMMETA, "Problem with dimension metadata. ");
map.put(NC_EATTMETA, "Problem with attribute metadata. ");
map.put(NC_EVARMETA, "Problem with variable metadata. ");
map.put(NC_ENOCOMPOUND, "Not a compound type. ");
map.put(NC_EATTEXISTS, "Attribute already exists. ");
map.put(NC_ENOTNC4, "Attempting netcdf-4 operation on netcdf-3 file. ");
map.put(NC_ESTRICTNC3,
"Attempting netcdf-4 operation on strict nc3 netcdf-4 file. ");
map.put(NC_ENOTNC3, "Attempting netcdf-3 operation on netcdf-4 file. ");
map.put(NC_ENOPAR,
"Parallel operation on file opened for non-parallel access. ");
map.put(NC_EPARINIT, "Error initializing for parallel access. ");
map.put(NC_EBADGRPID, "Bad group ID. ");
map.put(NC_EBADTYPID, "Bad type ID. ");
map.put(NC_ETYPDEFINED,
"Type has already been defined and may not be edited. ");
map.put(NC_EBADFIELD, "Bad field ID. ");
map.put(NC_EBADCLASS, "Bad class. ");
map.put(NC_EMAPTYPE, "Mapped access for atomic types only. ");
map.put(NC_ELATEFILL,
"Attempt to define fill value when data already exists. ");
map.put(NC_ELATEDEF,
"Attempt to define var properties, like deflate, after enddef. ");
map.put(NC_EDIMSCALE, "Probem with HDF5 dimscales. ");
map.put(NC_ENOGRP, "No group found. ");
map.put(NC_ESTORAGE, "Can't specify both contiguous and chunking. ");
map.put(NC_EBADCHUNK, "Bad chunksize. ");
map.put(NC_ENOTBUILT,
"Attempt to use feature that was not turned on when netCDF was built. ");
map.put(NC_EDISKLESS, "Error in using diskless access. ");
ERROR_MAP = Collections.unmodifiableMap(map);
}
}

View file

@ -0,0 +1,217 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4;
import edu.mit.ll.netcdf.LLNetcdfDimJNI;
import edu.mit.ll.netcdf.LLNetcdfException;
import edu.mit.ll.netcdf.LLNetcdfVarJNI;
/**
* Wrapper to NetCDF Dimension native library calls
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 5, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public abstract class NcDimension extends NcBase {
protected final int dimId;
protected final String name;
protected final int len;
protected final int dataType;
protected final LLNetcdfDimJNI dims = new LLNetcdfDimJNI();
protected final LLNetcdfVarJNI vars = new LLNetcdfVarJNI();
/**
* @param fileId
* @param name
* @param len
* @param dataType
* @throws NetcdfException
*/
public NcDimension(int fileId, String name, int len, int dataType)
throws NetcdfException {
this.name = name;
this.len = len;
this.dataType = dataType;
try {
this.dimId = dims.defineDim(fileId, name, len);
int dimVar = vars.defineVar(fileId, name, dataType, 1,
new int[] { dimId });
init(fileId, dimVar);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
public static class ShortDimension extends NcDimension {
/**
* @param fileId
* @param name
* @param len
* @throws NetcdfException
*/
public ShortDimension(int fileId, String name, int len)
throws NetcdfException {
super(fileId, name, len, NcConstants.NC_SHORT);
}
/**
* Write dimension axis values. This method can only be called when file
* is in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param values
* @throws NetcdfException
*/
public void putDim(short[] values) throws NetcdfException {
try {
vars.writeShortArrayVar(fileId, varId, new int[] { 0 },
new int[] { values.length }, values);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
public static class IntDimension extends NcDimension {
/**
* @param fileId
* @param name
* @param len
* @throws NetcdfException
*/
public IntDimension(int fileId, String name, int len)
throws NetcdfException {
super(fileId, name, len, NcConstants.NC_INT);
}
/**
* Write dimension axis values. This method can only be called when file
* is in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param values
* @throws NetcdfException
*/
public void putDim(int[] values) throws NetcdfException {
try {
vars.writeIntegerArrayVar(fileId, varId, new int[] { 0 },
new int[] { values.length }, values);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
public static class FloatDimension extends NcDimension {
/**
* @param fileId
* @param name
* @param len
* @throws NetcdfException
*/
public FloatDimension(int fileId, String name, int len)
throws NetcdfException {
super(fileId, name, len, NcConstants.NC_FLOAT);
}
/**
* Write dimension axis values. This method can only be called when file
* is in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param values
* @throws NetcdfException
*/
public void putDim(float[] values) throws NetcdfException {
try {
vars.writeFloatArrayVar(fileId, varId, new int[] { 0 },
new int[] { values.length }, values);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
public static class DoubleDimension extends NcDimension {
/**
* @param fileId
* @param name
* @param len
* @throws NetcdfException
*/
public DoubleDimension(int fileId, String name, int len)
throws NetcdfException {
super(fileId, name, len, NcConstants.NC_DOUBLE);
}
/**
* Write dimension axis values. This method can only be called when file
* is in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param values
* @throws NetcdfException
*/
public void putDim(double[] values) throws NetcdfException {
try {
vars.writeDoubleArrayVar(fileId, varId, new int[] { 0 },
new int[] { values.length }, values);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @return the len
*/
public int getLen() {
return len;
}
/**
* @return the dimId
*/
public int getDimId() {
return dimId;
}
/**
* @return the dataType
*/
public int getDataType() {
return dataType;
}
}

View file

@ -0,0 +1,76 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.ConcurrentHashMap;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 6, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class NcFactory {
private static final ConcurrentHashMap<Class<?>, Constructor<?>> cmap = new ConcurrentHashMap<Class<?>, Constructor<?>>();
@SuppressWarnings("unchecked")
public static <T extends NcDimension> T createDim(int fileId, String name,
int len, Class<T> dimClass) throws SecurityException,
NoSuchMethodException, IllegalArgumentException,
InstantiationException, IllegalAccessException,
InvocationTargetException {
Constructor<T> constructor = (Constructor<T>) cmap.get(dimClass);
if (constructor == null) {
synchronized (cmap) {
constructor = (Constructor<T>) cmap.get(dimClass);
if (constructor == null) {
constructor = dimClass.getConstructor(int.class,
String.class, int.class);
cmap.put(dimClass, constructor);
}
}
}
return constructor.newInstance(fileId, name, len);
}
@SuppressWarnings("unchecked")
public static <T extends NcVariable> T createVar(int fileId, String name,
NcDimension[] dims, Class<T> varClass) throws SecurityException,
NoSuchMethodException, IllegalArgumentException,
InstantiationException, IllegalAccessException,
InvocationTargetException {
Constructor<T> constructor = (Constructor<T>) cmap.get(varClass);
if (constructor == null) {
synchronized (cmap) {
constructor = (Constructor<T>) cmap.get(varClass);
if (constructor == null) {
constructor = varClass.getConstructor(int.class,
String.class, NcDimension[].class);
cmap.put(varClass, constructor);
}
}
}
return constructor.newInstance(fileId, name, dims);
}
}

View file

@ -0,0 +1,274 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4;
import edu.mit.ll.netcdf.LLNetcdfException;
import edu.mit.ll.netcdf.LLNetcdfVarJNI;
/**
* Wrapper for NetCDF variable native library
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 5, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public abstract class NcVariable extends NcBase {
protected final String name;
protected final NcDimension[] dims;
protected final int dataType;
protected final LLNetcdfVarJNI vars = new LLNetcdfVarJNI();
/**
* @param fileId
* @param name
* @param dataType
* @param dims
* @throws NetcdfException
*/
public NcVariable(int fileId, String name, int dataType, NcDimension[] dims)
throws NetcdfException {
this.name = name;
this.dims = dims;
this.dataType = dataType;
int[] dimIds = new int[dims.length];
for (int i = 0; i < dims.length; ++i) {
dimIds[i] = dims[i].getDimId();
}
try {
int varId = vars.defineVar(fileId, name, dataType, dims.length,
dimIds);
init(fileId, varId);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
public static class ByteVariable extends NcVariable {
/**
* @param fileId
* @param name
* @param dataType
* @param dims
* @throws NetcdfException
*/
public ByteVariable(int fileId, String name, NcDimension[] dims)
throws NetcdfException {
super(fileId, name, NcConstants.NC_BYTE, dims);
}
/**
* Write data to variable. This method can only be called when file is
* in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param startIndex
* starting indexes for each dimension
* @param shape
* length of each dimension in value
* @param value
* data to be written
* @throws NetcdfException
*/
public void putVar(int[] startIndex, int[] shape, byte[] value)
throws NetcdfException {
try {
vars.writeByteArrayVar(fileId, varId, startIndex, shape, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
public static class ShortVariable extends NcVariable {
/**
* @param fileId
* @param name
* @param dataType
* @param dims
* @throws NetcdfException
*/
public ShortVariable(int fileId, String name, NcDimension[] dims)
throws NetcdfException {
super(fileId, name, NcConstants.NC_SHORT, dims);
}
/**
* Write data to variable. This method can only be called when file is
* in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param startIndex
* starting indexes for each dimension
* @param shape
* length of each dimension in value
* @param value
* data to be written
* @throws NetcdfException
*/
public void putVar(int[] startIndex, int[] shape, short[] value)
throws NetcdfException {
try {
vars.writeShortArrayVar(fileId, varId, startIndex, shape, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
public static class IntVariable extends NcVariable {
/**
* @param fileId
* @param name
* @param dataType
* @param dims
* @throws NetcdfException
*/
public IntVariable(int fileId, String name, NcDimension[] dims)
throws NetcdfException {
super(fileId, name, NcConstants.NC_INT, dims);
}
/**
* Write data to variable. This method can only be called when file is
* in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param startIndex
* starting indexes for each dimension
* @param shape
* length of each dimension in value
* @param value
* data to be written
* @throws NetcdfException
*/
public void putVar(int[] startIndex, int[] shape, int[] value)
throws NetcdfException {
try {
vars.writeIntegerArrayVar(fileId, varId, startIndex, shape,
value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
public static class FloatVariable extends NcVariable {
/**
* @param fileId
* @param name
* @param dataType
* @param dims
* @throws NetcdfException
*/
public FloatVariable(int fileId, String name, NcDimension[] dims)
throws NetcdfException {
super(fileId, name, NcConstants.NC_FLOAT, dims);
}
/**
* Write data to variable. This method can only be called when file is
* in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param startIndex
* starting indexes for each dimension
* @param shape
* length of each dimension in value
* @param value
* data to be written
* @throws NetcdfException
*/
public void putVar(int[] startIndex, int[] shape, float[] value)
throws NetcdfException {
try {
vars.writeFloatArrayVar(fileId, varId, startIndex, shape, value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
public static class DoubleVariable extends NcVariable {
/**
* @param fileId
* @param name
* @param dataType
* @param dims
* @throws NetcdfException
*/
public DoubleVariable(int fileId, String name, NcDimension[] dims)
throws NetcdfException {
super(fileId, name, NcConstants.NC_DOUBLE, dims);
}
/**
* Write data to variable. This method can only be called when file is
* in data mode after {@link Netcdf#endFileDefinition()} is called.
*
* @param startIndex
* starting indexes for each dimension
* @param shape
* length of each dimension in value
* @param value
* data to be written
* @throws NetcdfException
*/
public void putVar(int[] startIndex, int[] shape, double[] value)
throws NetcdfException {
try {
vars.writeDoubleArrayVar(fileId, varId, startIndex, shape,
value);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @return the dims
*/
public NcDimension[] getDims() {
return dims;
}
/**
* @return the dataType
*/
public int getDataType() {
return dataType;
}
}

View file

@ -0,0 +1,171 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4;
import edu.mit.ll.netcdf.LLNetcdfException;
import edu.mit.ll.netcdf.LLNetcdfJNI;
/**
* Wrapper to NetCDF 4 native library.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 5, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class Netcdf extends NcBase {
protected final LLNetcdfJNI ncfile = new LLNetcdfJNI();
/**
* create mode for NetCDF 4 using classic model
*/
public static final int NETCDF4_CLASSIC_MODE = NcConstants.NC_CLASSIC_MODEL
| NcConstants.NC_NETCDF4;
/**
* @param path
* absolute path of file
* @throws NetcdfException
*/
public Netcdf(String path) throws NetcdfException {
this(path, NcConstants.NC_CLOBBER);
}
/**
* @param path
* absolute path of file
* @param mode
* create mode passed to nc_open
* @throws NetcdfException
*/
public Netcdf(String path, int mode) throws NetcdfException {
this(path, mode, NcConstants.NC_SIZEHINT_DEFAULT,
NcConstants.NC_SIZEHINT_DEFAULT);
}
/**
* @param path
* absolute path of file
* @param mode
* create mode passed to nc__open
* @param initialSize
* initial size hint passed to nc__open
* @param chunkSizeHint
* buffer size hint passed to nc__open
* @throws NetcdfException
*/
public Netcdf(String path, int mode, int initialSize, int chunkSizeHint)
throws NetcdfException {
try {
int fileId = ncfile.createFile(path, mode, initialSize,
chunkSizeHint);
init(fileId, NcConstants.NC_GLOBAL);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Define a NetCDF dimension in file. The return value can be used to
* populate the dimension axis values after {@link #endFileDefinition()} is
* called
*
* @param <T>
* data type specific {@link NcDimension} sub class
* @param name
* name of dimension
* @param len
* length of dimension
* @param dimClass
* class object for {@link NcDimension} sub class
* @return datatype specific {@link NcDimension} object
* @throws NetcdfException
*/
public <T extends NcDimension> T defineDim(String name, int len,
Class<T> dimClass) throws NetcdfException {
try {
return NcFactory.createDim(fileId, name, len, dimClass);
} catch (Exception e) {
throw new NetcdfException("Unable to create dimension", e);
}
}
/**
* Define a NetCDF variable in file. The return value can be used to
* populate the variable values after {@link #endFileDefinition()} is called
*
* @param <T>
* data type specific {@link NcVariable} sub class
* @param name
* name of variable
* @param dims
* array of dimensions for this variable in proper order
* @param varClass
* class object for {@link NcVariable} sub class
* @return datatype specific {@link NcVariable} object
* @throws NetcdfException
*/
public <T extends NcVariable> T defineVar(String name, NcDimension[] dims,
Class<T> varClass) throws NetcdfException {
try {
return NcFactory.createVar(fileId, name, dims, varClass);
} catch (Exception e) {
throw new NetcdfException("Unable to create variable", e);
}
}
/**
* End definition stage of file creation and start data writing stage. After
* this method is called, return values of
* {@link #defineDim(String, int, Class)} and
* {@link #defineVar(String, NcDimension[], Class)} can be used to write
* data to file.
*
* @throws NetcdfException
*/
public void endFileDefinition() throws NetcdfException {
try {
ncfile.endFileDefinition(fileId);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* Called after all data has been written to file.
*
* @throws NetcdfException
*/
public void close() throws NetcdfException {
try {
ncfile.closeFile(fileId);
} catch (LLNetcdfException e) {
throw new NetcdfException(e);
}
}
/**
* @return the ncid
*/
public int getFileId() {
return fileId;
}
}

View file

@ -0,0 +1,84 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4;
import edu.mit.ll.netcdf.LLNetcdfException;
/**
* Exception used in Netcdf interface
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 5, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class NetcdfException extends Exception{
private static final long serialVersionUID = -508018999572379516L;
protected int errorCode;
/**
*
*/
public NetcdfException(LLNetcdfException llex) {
this(llex.getError());
}
public NetcdfException(int errorCode) {
super(NcConstants.ERROR_MAP.get(errorCode));
}
/**
* @param message
* @param cause
*/
public NetcdfException(String message, Throwable cause) {
super(message, cause);
}
/**
* @param message
*/
public NetcdfException(String message) {
super(message);
}
/**
* @param cause
*/
public NetcdfException(Throwable cause) {
super(cause);
}
/**
* @return the errorCode
*/
public int getErrorCode() {
return errorCode;
}
/**
* @param errorCode
* the errorCode to set
*/
public void setErrorCode(int errorCode) {
this.errorCode = errorCode;
}
}

View file

@ -0,0 +1,53 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4.cf;
/**
* CF Conventions as described for NetCDF library 1.6
* Place holder for convention descriptions and names
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 29, 2013 ekladstrup Initial creation
*
* </pre>
*
* @author ekladstrup
* @version 1.0
*/
public enum CFConventions {
CF16("CF-1.6");
/**
* @param value
*/
private CFConventions(final String value) {
this.value = value;
}
private final String value;
/*
* (non-Javadoc)
*
* @see java.lang.Enum#toString()
*/
@Override
public String toString() {
return value;
}
}

View file

@ -0,0 +1,170 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4.cf;
/**
* CF Constants as described for NetCDF library 1.6
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 7, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class CfConstants {
/**
* Global attribute {@link #CONVENTIONS_ATTR} value for version 1.6
*/
public static final String CONVENTIONS1_6 = "CF-1.6";
/**
* Global attribute for conventions version
*/
public static final String CONVENTIONS_ATTR = "Conventions";
/**
* Variable attribute for standard name
*/
public static final String STANDARD_NAME_ATTR = "standard_name";
/**
* Variable attribute for long name
*/
public static final String LONG_NAME_ATTR = "long_name";
/**
* Variable attribute for units
*/
public static final String UNITS_ATTR = "units";
/**
* Variable attribute for cell methods
*/
public static final String CELL_METHODS_ATTR = "cell_methods";
/**
* Dimension attribute for axis label (x, y, z...)
*/
public static final String AXIS_ATTR = "axis";
/**
* Attribute value for {@link #AXIS_ATTR} for x axis
*/
public static final String X_AXIS = "X";
/**
* Attribute value for {@link #AXIS_ATTR} for y axis
*/
public static final String Y_AXIS = "Y";
/**
* Attribute value for {@link #AXIS_ATTR} for vertical axis
*/
public static final String Z_AXIS = "Z";
/**
* Attribute value for {@link #AXIS_ATTR} for time axis
*/
public static final String T_AXIS = "T";
/**
* Variable attribute for missing values
*/
public static final String MISSING_VAL_ATTR = "missing_value";
/**
* {@link #UNITS_ATTR} value for latitude dimension
*/
public static final String LAT_UNITS = "degrees_north";
/**
* {@link #UNITS_ATTR} value for longitude dimension
*/
public static final String LON_UNITS = "degrees_east";
/**
* Vertical dimension attribute to denote which direction is positive
*/
public static final String POS_ATTR = "positive";
/**
* {@link #POS_ATTR} value indicating that up is positive
*/
public static final String UP_POS = "up";
/**
* {@link #POS_ATTR} value indicating that down is positive
*/
public static final String DWN_POS = "down";
/**
* Calendar attribute for Time Dimensions
*/
public static final String CAL_ATTR = "calendar";
/**
* Default value for {@link #CAL_ATTR}
*/
public static final String GREG_CALENDAR = "gregorian";
/**
* {@link #UNITS_ATTR} value for time dimension that uses UNIX time
*/
public static final String UNIX_TIME_UNITS = "seconds since 1970-1-1 0:0:0";
/**
* attribute for coverage id
*/
public static final String COVERAGE_ID_ATTR = "coverage_id";
/**
* Grid mapping name attribute
*/
public static final String GRID_MAP_NAME_ATTR = "grid_mapping_name";
/**
* standard parallel attribute used in grid mapping variable
*/
public static final String STD_PARALLEL_ATTR = "standard_parallel";
/**
* central meridian longitude attribute used in grid mapping variable
*/
public static final String CENTRAL_MERID_LON_ATTR = "longitude_of_central_meridian";
/**
* projection origin latitude attribute used in grid mapping variable
*/
public static final String PROJ_ORIGIN_LAT_ATTR = "latitude_of_projection_origin";
/**
* attribute for list of variables that contain geographic coordinates
*/
public static final String COORDS_ATTR = "coordinates";
/**
* Standard name value for projected x dimension
*/
public static final String X_STD_NAME = "projection_x_coordinate";
/**
* Standard name value for projected y dimension
*/
public static final String Y_STD_NAME = "projection_y_coordinate";
}

View file

@ -0,0 +1,95 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4.cf;
import java.util.Arrays;
import com.raytheon.uf.common.nc4.NcDimension;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 3, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class CfDimensions<T extends NcDimension> {
private final CfHorizontalDims<T> xyDims;
private final T zDim;
private final T tDim;
/**
* @param xyDims
* @param zDim
* @param tDim
*/
public CfDimensions(CfHorizontalDims<T> xyDims, T zDim, T tDim) {
this.xyDims = xyDims;
this.zDim = zDim;
this.tDim = tDim;
}
/**
* @return the xyDims
*/
public CfHorizontalDims<T> getXyDims() {
return xyDims;
}
/**
* @return the zDim
*/
public T getzDim() {
return zDim;
}
/**
* @return the tDim
*/
public T gettDim() {
return tDim;
}
@SuppressWarnings("unchecked")
public T[] toArray() {
T[] a = (T[]) java.lang.reflect.Array
.newInstance(zDim.getClass(), 4);
fill(a);
return a;
}
public T[] toArray(T[] a) {
if (a.length < 4) {
a = Arrays.copyOf(a, 4);
}
fill(a);
return a;
}
private void fill(T[] a) {
a[0] = tDim;
a[1] = zDim;
a[2] = xyDims.getY();
a[3] = xyDims.getX();
}
}

View file

@ -0,0 +1,61 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4.cf;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 7, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class CfGridMapper {
private static final Properties ATTRIB_MAP = new Properties();
private static final IUFStatusHandler log = UFStatus
.getHandler(CfGridMapper.class);
static {
ClassLoader loader = CfGridMapper.class.getClassLoader();
InputStream res = loader
.getResourceAsStream("META-INF/nc4-CF-grid-mapping.properties");
if (res == null) {
log.warn("Unable to find grid attribute map");
} else {
try {
ATTRIB_MAP.load(res);
} catch (IOException e) {
log.error("Unable to load mapping properties", e);
}
}
}
public static String getMappingAttributeName(String name) {
return ATTRIB_MAP.getProperty(name, name);
}
}

View file

@ -0,0 +1,100 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4.cf;
import com.raytheon.uf.common.nc4.NcDimension;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 3, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class CfHorizontalDims<T extends NcDimension> {
private final T x;
private final T y;
private final String coords;
private final String gridMapping;
private final boolean mapped;
public CfHorizontalDims(T x, T y) {
this(x, y, null, null, false);
}
/**
* @param dims
* @param coords
* @param gridMapping
*/
public CfHorizontalDims(T x, T y, String coords,
String gridMapping) {
this(x, y, coords, gridMapping, true);
}
private CfHorizontalDims(T x, T y, String coords,
String gridMapping, boolean mapped) {
this.x = x;
this.y = y;
this.coords = coords;
this.gridMapping = gridMapping;
this.mapped = mapped;
}
/**
* @return the x
*/
public T getX() {
return x;
}
/**
* @return the y
*/
public T getY() {
return y;
}
/**
* @return the coords
*/
public String getCoords() {
return coords;
}
/**
* @return the gridMapping
*/
public String getGridMapping() {
return gridMapping;
}
/**
* @return the mapped
*/
public boolean isMapped() {
return mapped;
}
}

View file

@ -0,0 +1,207 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4.cf;
import com.raytheon.uf.common.nc4.NcDimension;
import com.raytheon.uf.common.nc4.Netcdf;
import com.raytheon.uf.common.nc4.NetcdfException;
/**
* Climate and Forecast conventions wrapper for netcdf
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 7, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class CfNetcdf extends Netcdf {
/**
* @param path
* @throws NetcdfException
*/
public CfNetcdf(String path) throws NetcdfException {
super(path);
addDefaultAttributes();
}
/**
* @param path
* @param mode
* @throws NetcdfException
*/
public CfNetcdf(String path, int mode) throws NetcdfException {
super(path, mode);
addDefaultAttributes();
}
/**
* @param path
* @param mode
* @param initialSize
* @param chunkSizeHint
* @throws NetcdfException
*/
public CfNetcdf(String path, int mode, int initialSize, int chunkSizeHint)
throws NetcdfException {
super(path, mode, initialSize, chunkSizeHint);
addDefaultAttributes();
}
/**
* Add default global attributes for CF file
*
* @throws NetcdfException
*/
private void addDefaultAttributes() throws NetcdfException {
putStringAttribute(CfConstants.CONVENTIONS_ATTR,
CfConstants.CONVENTIONS1_6);
}
/**
* Define the X dimension for file. If the X/Y axes are in Long/Lat the X
* dimension is longitude. The return value can be used to populate the
* dimension axis values after {@link #endFileDefinition()} is called
*
* @param <T>
* data type specific {@link NcDimension} sub class
* @param name
* name of dimension
* @param longName
* long name of dimension
* @param len
* length of dimension
* @param units
* units that this axis is in
* @param dimClass
* class object for {@link NcDimension} sub class
* @return
* @throws NetcdfException
*/
public <T extends NcDimension> T defineXDim(String name, String longName,
int len, String units, Class<T> dimClass) throws NetcdfException {
T rval = super.defineDim(name, len, dimClass);
setDimAttrs(rval, longName, units, CfConstants.X_AXIS);
return rval;
}
/**
* Define the Y dimension for file. If the X/Y axes are in Long/Lat the Y
* dimension is latitude. The return value can be used to populate the
* dimension axis values after {@link #endFileDefinition()} is called
*
* @param <T>
* data type specific {@link NcDimension} sub class
* @param name
* name of dimension
* @param longName
* long name of dimension
* @param len
* length of dimension
* @param units
* units that this axis is in
* @param dimClass
* class object for {@link NcDimension} sub class
* @return
* @throws NetcdfException
*/
public <T extends NcDimension> T defineYDim(String name, String longName,
int len, String units, Class<T> dimClass) throws NetcdfException {
T rval = super.defineDim(name, len, dimClass);
setDimAttrs(rval, longName, units, CfConstants.Y_AXIS);
return rval;
}
/**
* Define the Z dimension for file. This is the horizontal axis. The return
* value can be used to populate the dimension axis values after
* {@link #endFileDefinition()} is called
*
* @param <T>
* data type specific {@link NcDimension} sub class
* @param name
* name of dimension
* @param longName
* long name of dimension
* @param len
* length of dimension
* @param units
* units that this axis is in
* @param upIsPositive
* true if increasing values on axis indicate an increase in
* horizontal distance
* @param dimClass
* class object for {@link NcDimension} sub class
* @return
* @throws NetcdfException
*/
public <T extends NcDimension> T defineZDim(String name, String longName,
int len, String units, boolean upIsPositive, Class<T> dimClass)
throws NetcdfException {
T rval = super.defineDim(name, len, dimClass);
setDimAttrs(rval, longName, units, CfConstants.Z_AXIS);
String posVal = upIsPositive ? CfConstants.UP_POS : CfConstants.DWN_POS;
rval.putStringAttribute(CfConstants.POS_ATTR, posVal);
return rval;
}
/**
* Define the T dimension for file. This is the temporal dimension. The
* return value can be used to populate the dimension axis values after
* {@link #endFileDefinition()} is called
*
* @param <T>
* data type specific {@link NcDimension} sub class
* @param name
* name of dimension
* @param stdName
* standard name of dimension
* @param len
* length of dimension
* @param units
* units that this axis is in
* @param dimClass
* class object for {@link NcDimension} sub class
* @return
* @throws NetcdfException
*/
public <T extends NcDimension> T defineTimeDim(String name, String stdName,
int len, String units, Class<T> dimClass) throws NetcdfException {
T rval = super.defineDim(name, len, dimClass);
setDimAttrs(rval, stdName, units, CfConstants.T_AXIS);
rval.putStringAttribute(CfConstants.CAL_ATTR, CfConstants.GREG_CALENDAR);
return rval;
}
/**
* Set default dimension attributes
*
* @param dim
* @param stdName
* @param units
* @param axis
* @throws NetcdfException
*/
private void setDimAttrs(NcDimension dim, String stdName, String units,
String axis) throws NetcdfException {
dim.putStringAttribute(CfConstants.LONG_NAME_ATTR, stdName);
dim.putStringAttribute(CfConstants.STANDARD_NAME_ATTR, stdName);
dim.putStringAttribute(CfConstants.UNITS_ATTR, units);
dim.putStringAttribute(CfConstants.AXIS_ATTR, axis);
}
}

View file

@ -0,0 +1,38 @@
/**
* Copyright 09/24/12 Raytheon Company.
*
* Unlimited Rights
* This software was developed pursuant to Contract Number
* DTFAWA-10-D-00028 with the US Government. The US Governments rights
* in and to this copyrighted software are as specified in DFARS
* 252.227-7014 which was made part of the above contract.
*/
package com.raytheon.uf.common.nc4.cf;
import java.util.regex.Pattern;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 7, 2013 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class CfUtils {
public static final Pattern CF_NAME_PATTERN = Pattern
.compile("^[a-zA-Z][a-zA-Z0-9_]*$");
public static boolean validName(String name) {
return CF_NAME_PATTERN.matcher(name).matches();
}
}

View file

@ -51,6 +51,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Sep 24, 2008 chammack Initial creation
* Nov 13, 2008 njensen Added thrift methods
* May 22, 2013 1917 rjpeter Added non-pretty print option to jaxb serialize methods.
* Aug 18, 2013 #2097 dhladky Allowed extension by OGCJAXBManager
* </pre>
*
* @author chammack
@ -106,7 +107,7 @@ public class JAXBManager {
private final JAXBContext jaxbContext;
private final Queue<Unmarshaller> unmarshallers = new ConcurrentLinkedQueue<Unmarshaller>();
protected final Queue<Unmarshaller> unmarshallers = new ConcurrentLinkedQueue<Unmarshaller>();
protected final Queue<Marshaller> marshallers = new ConcurrentLinkedQueue<Marshaller>();

View file

@ -48,6 +48,7 @@ import org.geotools.coverage.grid.ViewType;
import org.geotools.coverage.processing.Operations;
import org.geotools.geometry.DirectPosition2D;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.geotools.referencing.CRS;
import org.opengis.geometry.DirectPosition;
import org.opengis.geometry.MismatchedDimensionException;
import org.opengis.metadata.spatial.PixelOrientation;
@ -157,6 +158,10 @@ public class DataReprojector {
String reprojectedDataset, ISpatialObject spatial,
CoordinateReferenceSystem crs, Request req) throws Exception {
IDataRecord dataRecord;
if (CRS.equalsIgnoreMetadata(crs, spatial.getCrs())) {
// original dataset, no reproject
reprojectedDataset = dataSet;
}
// check if data has already been reprojected
if (!datasetExists(group, reprojectedDataset)) {
// it hasn't lock and reproject
@ -452,7 +457,7 @@ public class DataReprojector {
* @throws MismatchedDimensionException
* @throws FactoryException
*/
protected RequestWrapper getRequest(ISpatialObject spatial,
public static RequestWrapper getRequest(ISpatialObject spatial,
ReferencedEnvelope nativeEnv, ReferencedEnvelope targetEnvelope)
throws MismatchedDimensionException,
TransformException, FactoryException {
@ -492,7 +497,8 @@ public class DataReprojector {
* @throws MismatchedDimensionException
* @throws TransformException
*/
protected RequestWrapper getSubSlice(GridGeometry2D geom, Envelope env,
protected static RequestWrapper getSubSlice(GridGeometry2D geom,
Envelope env,
int[] dims) throws MismatchedDimensionException, TransformException {
RequestWrapper rval = new RequestWrapper();
MathTransform2D crsToGrid2D = geom
@ -517,7 +523,8 @@ public class DataReprojector {
* @throws MismatchedDimensionException
* @throws TransformException
*/
protected ReferencedEnvelope transformGrid(MathTransform2D gridToCrs,
protected static ReferencedEnvelope transformGrid(
MathTransform2D gridToCrs,
int[][] minmax, CoordinateReferenceSystem crs)
throws MismatchedDimensionException, TransformException {
int[] min = minmax[0];
@ -545,7 +552,8 @@ public class DataReprojector {
* @throws MismatchedDimensionException
* @throws TransformException
*/
protected int[][] transformEnv(MathTransform2D crsToGrid, Envelope env,
protected static int[][] transformEnv(MathTransform2D crsToGrid,
Envelope env,
int[] dims) throws MismatchedDimensionException, TransformException {
DirectPosition lower = new DirectPosition2D(env.getMinX(),
env.getMinY());

View file

@ -17,11 +17,9 @@
[Enter License Description here.]
</license>
<requires>
<import feature="com.raytheon.uf.edex.common.core.feature" version="0.0.0"/>
<import feature="com.raytheon.uf.edex.core.feature" version="0.0.0"/>
<import feature="com.raytheon.uf.edex.registry.client.feature" version="1.0.0.qualifier"/>
</requires>
<includes
id="com.raytheon.uf.edex.registry.client.feature"
version="0.0.0"/>
<plugin
id="net.opengis"
@ -97,13 +95,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.madis.ogc"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.datadelivery.retrieval"
download-size="0"
@ -139,4 +130,11 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.wcs"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View file

@ -74,5 +74,18 @@
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.w3.XMLSchema"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.common.nc4"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View file

@ -23,6 +23,7 @@ Require-Bundle: com.raytheon.uf.common.datadelivery.retrieval;bundle-version="1.
com.raytheon.uf.common.dataplugin.madis;bundle-version="1.0.0",
com.raytheon.uf.edex.plugin.madis.ogc;bundle-version="1.0.0",
com.raytheon.uf.edex.plugin.madis;bundle-version="1.0.0",
com.raytheon.uf.edex.wfs;bundle-version="1.0.0"
com.raytheon.uf.edex.wfs;bundle-version="1.0.0",
org.eclipse.xsd;bundle-version="2.8.1"
Export-Package: com.raytheon.uf.edex.datadelivery.retrieval.wfs,
com.raytheon.uf.edex.datadelivery.retrieval.wfs.metadata

View file

@ -32,6 +32,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* May 31, 2013 2038 djohnson Move to correct repo.
* Jun 11, 2013 1763 dhladky Made operational.
* Jun 18, 2013 2120 dhladky Added times and max feature processing
* Aug 07, 2013 2097 dhladky Revamped WFS to use POST (still 1.1.0 WFS)
*
* </pre>
*
@ -46,44 +47,55 @@ public class WfsRequestBuilder extends RequestBuilder {
protected static ServiceConfig wfsServiceConfig;
public static final String separator = getServiceConfig().getConstantValue("COMMA");
public static final String SEPERATOR = getServiceConfig().getConstantValue("COMMA");
public static final String slash = getServiceConfig().getConstantValue("FORWARD_SLASH");
public static final String SLASH = getServiceConfig().getConstantValue("FORWARD_SLASH");
public static final String bbox = getServiceConfig().getConstantValue("BBOX_HEADER");
public static final String BBOX = getServiceConfig().getConstantValue("BBOX_HEADER");
public static final String srs = getServiceConfig().getConstantValue("SRSNAME_HEADER");
public static final String SRS = getServiceConfig().getConstantValue("SRSNAME_HEADER");
public static final String crs = getServiceConfig().getConstantValue("DEFAULT_CRS");
public static final String CRS = getServiceConfig().getConstantValue("DEFAULT_CRS");
public static final String time = getServiceConfig().getConstantValue("TIME_HEADER");
public static final String TIME = getServiceConfig().getConstantValue("TIME_HEADER");
public static final String equals = getServiceConfig().getConstantValue("EQUALS");
public static final String EQUALS = getServiceConfig().getConstantValue("EQUALS");
public static final String blank = getServiceConfig().getConstantValue("BLANK");
public static final String BLANK = getServiceConfig().getConstantValue("BLANK");
public static final String max = getServiceConfig().getConstantValue("MAX");
public static final String MAX = getServiceConfig().getConstantValue("MAX");
public static final String ampersand = "&";
public static final String VERSION = getServiceConfig().getConstantValue("VERSION");
public static final String AMPERSAND = "&";
private final String wfsURL;
WfsRequestBuilder(WfsRetrievalAdapter adapter,
private String typeName = null;
public WfsRequestBuilder(WfsRetrievalAdapter adapter,
RetrievalAttribute attXML) {
super(attXML);
// Create URL
// this works in this order
StringBuilder buffer = new StringBuilder();
// apply the base WFS service URL
buffer.append(adapter.getProviderRetrievalXMl().getConnection()
.getUrl());
// process the coverage bounding box
buffer.append(processCoverage());
// process the time range you are trying to retrieve
buffer.append(processTime(getRetrievalAttribute().getTime()));
// max feature limit
buffer.append(processMax());
// Create XML doc
this.typeName = attXML.getPlugin();
StringBuilder buffer = new StringBuilder(256);
buffer.append(createHeader());
buffer.append("<ogc:Filter>\n");
if (attXML.getCoverage() != null && attXML.getTime() != null) {
buffer.append("<ogc:And>\n");
}
buffer.append(processTime(attXML.getTime()));
buffer.append(processCoverage());
if (attXML.getCoverage() != null && attXML.getTime() != null) {
buffer.append("</ogc:And>\n");
}
buffer.append("</ogc:Filter>\n");
buffer.append(createFooter());
this.wfsURL = buffer.toString().trim();
}
@ -98,92 +110,115 @@ public class WfsRequestBuilder extends RequestBuilder {
return sdf;
}
};
/**
* Creates the WFS XML Query header
* @return
*/
private String createHeader() {
StringBuilder sb = new StringBuilder(256);
sb.append("<?xml version=\"1.0\" ?>\n");
sb.append("<wfs:GetFeature service=\"WFS\"\n");
sb.append("version=\"").append(VERSION).append("\"\n");
sb.append("outputFormat=\"application/gml+xml; version=3.1\"\n");
sb.append("xmlns:").append(typeName).append("=\"http://").append(typeName).append(".edex.uf.raytheon.com\"\n");
sb.append("xmlns:wfs=\"http://www.opengis.net/wfs\"\n");
sb.append("xmlns:gml=\"http://www.opengis.net/gml\"\n");
sb.append("xmlns:ogc=\"http://www.opengis.net/ogc\"\n");
sb.append("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
sb.append("xsi:schemaLocation=\"http://www.opengis.net/wfs../wfs/").append(VERSION).append("/WFS.xsd\">\n");
sb.append("<wfs:Query typeName=\"").append(typeName).append(":").append(typeName).append("\" maxFeatures=\"").append(MAX).append("\">\n");
return sb.toString();
}
/**
* Creates the WFS XML Query Footer
* @return
*/
private String createFooter() {
String footer = "</wfs:Query>\n</wfs:GetFeature>\n";
return footer;
}
@Override
public String processTime(Time inTime) {
try {
if (inTime.getEndDate() != null && inTime.getStartDate() != null) {
if (inTime.getStartDate() != null) {
Date sDate = inTime.getStartDate();
Date eDate = inTime.getEndDate();
String endDateString = ogcDateFormat.get().format(eDate);
String startDateString = ogcDateFormat.get().format(sDate);
StringBuilder sb = new StringBuilder();
sb.append(ampersand);
sb.append(time);
sb.append(equals);
sb.append(startDateString);
sb.append(slash);
if (!endDateString.equals(startDateString)) {
sb.append(endDateString);
StringBuilder sb = new StringBuilder(256);
sb.append("<ogc:PropertyIsGreaterThan>\n");
sb.append("<ogc:PropertyName>").append(typeName).append(":timeObs</ogc:PropertyName>\n");
sb.append("<ogc:Literal>").append(startDateString).append("</ogc:Literal>\n");
sb.append("</ogc:PropertyIsGreaterThan>\n");
if (endDateString != null) {
sb.append("<ogc:PropertyIsLessThan>\n");
sb.append("<ogc:PropertyName>").append(typeName).append(":timeObs</ogc:PropertyName>\n");
sb.append("<ogc:Literal>").append(endDateString).append("</ogc:Literal>\n");
sb.append("</ogc:PropertyIsLessThan>\n");
}
return sb.toString();
}
} catch (Exception e) {
statusHandler.error("Couldn't parse Time object." + e);
statusHandler.error("Couldn't parse Time object.", e);
}
// no times, return blank
return blank;
return BLANK;
}
@Override
public String processCoverage() {
StringBuilder sb = new StringBuilder();
Coverage coverage = getRetrievalAttribute().getCoverage();
if (coverage != null) {
try {
StringBuilder sb = new StringBuilder(256);
ReferencedEnvelope re = coverage.getRequestEnvelope();
Coordinate ll = EnvelopeUtils.getLowerLeftLatLon(re);
Coordinate ur = EnvelopeUtils.getUpperRightLatLon(re);
// manage the box
double lowerLon = ll.x;
double lowerLat = ll.y;
double upperLon = ur.x;
double upperLat = ur.y;
ReferencedEnvelope re = coverage.getRequestEnvelope();
Coordinate ll = EnvelopeUtils.getLowerLeftLatLon(re);
Coordinate ur = EnvelopeUtils.getUpperRightLatLon(re);
// manage the box
double lowerLon = ll.x;
double lowerLat = ll.y;
double upperLon = ur.x;
double upperLat = ur.y;
sb.append("<ogc:Within>\n");
sb.append("<ogc:PropertyName>location/location</ogc:PropertyName>\n");
sb.append("<gml:Envelope srsName=\"").append(CRS)
.append("\">\n");
sb.append("<gml:lowerCorner>");
sb.append(lowerLon);
sb.append(" ");
sb.append(lowerLat);
sb.append("</gml:lowerCorner>\n");
sb.append("<gml:upperCorner>");
sb.append(upperLon);
sb.append(" ");
sb.append(upperLat);
sb.append("</gml:upperCorner>\n");
sb.append("</gml:Envelope>\n");
sb.append("</ogc:Within>\n");
sb.append(ampersand);
sb.append(srs);
sb.append(equals);
sb.append(crs);
//TODO Revisit this when we have a better idea of how to switch them
//sb.append(coverage.getEnvelope().getCoordinateReferenceSystem()
// .getName());
sb.append(ampersand);
sb.append(bbox);
sb.append(equals);
sb.append(lowerLon);
sb.append(separator);
sb.append(lowerLat);
sb.append(separator);
sb.append(upperLon);
sb.append(separator);
sb.append(upperLat);
return sb.toString();
return sb.toString();
} catch (Exception e) {
statusHandler.error("Couldn't parse Coverage object.", e);
}
}
return blank;
return BLANK;
}
/**
* constrain to max amount of features
* @return
*/
public String processMax() {
StringBuilder sb = new StringBuilder();
sb.append(ampersand);
sb.append(max);
return sb.toString();
}
@Override
public String getRequest() {
return wfsURL;
@ -207,5 +242,5 @@ public class WfsRequestBuilder extends RequestBuilder {
return wfsServiceConfig;
}
}

View file

@ -3,7 +3,8 @@ package com.raytheon.uf.edex.datadelivery.retrieval.util;
import java.net.URI;
import java.net.URISyntaxException;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import com.raytheon.uf.common.comm.HttpClient;
import com.raytheon.uf.common.comm.HttpClient.HttpClientResponse;
@ -31,6 +32,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Jun 18, 2013 2120 dhladky Times fixes and SSL changes
* Jul 10, 2013 2180 dhladky Updated credential requests
* Aug 23, 2013 2180 mpduff Implement changes to ProviderCredentialsUtil
* Aug 06, 2013 2097 dhladky WFS 2.0 compliance upgrade and switched to POST
*
* </pre>
*
@ -54,16 +56,19 @@ public class WfsConnectionUtil {
* The data provider's name
* @return xml response
*/
public static String wfsConnect(String url, Connection providerConn,
public static String wfsConnect(String request, Connection providerConn,
String providerName) {
String xmlResponse = null;
HttpClient http = null;
String rootUrl = null;
try {
// TODO: consider using HTTP POST instead of GET
rootUrl = providerConn.getUrl();
http = HttpClient.getInstance();
HttpGet get = new HttpGet();
URI uri = new URI(url);
URI uri = new URI(rootUrl);
HttpPost post = new HttpPost(uri);
// check for the need to do a username password auth check
ProviderCredentials creds = ProviderCredentialsUtil
.retrieveCredentials(providerName);
@ -84,12 +89,13 @@ public class WfsConnectionUtil {
userName, password);
}
get.setURI(uri);
HttpClientResponse response = http.executeRequest(get);
post.setEntity(new StringEntity(request, "text/xml", "ISO-8859-1"));
HttpClientResponse response = http.executeRequest(post);
xmlResponse = new String(response.data);
} catch (Exception e) {
statusHandler.handle(Priority.PROBLEM,
"Couldn't connect to WFS server: " + url, e);
"Couldn't connect to WFS server: " + rootUrl, e);
}
return xmlResponse;

View file

@ -17,15 +17,6 @@
[Enter License Description here.]
</license>
<requires>
<import feature="com.raytheon.uf.edex.common.core.feature" version="0.0.0"/>
<import feature="com.raytheon.uf.edex.dataplugins.feature" version="1.0.0.qualifier"/>
<import feature="com.raytheon.uf.edex.core.feature" version="0.0.0"/>
<import feature="com.raytheon.uf.edex.registry.client.feature" version="0.0.0"/>
<import feature="com.raytheon.uf.edex.datadelivery.client.feature" version="0.0.0"/>
<import feature="com.raytheon.uf.edex.datadelivery.core.feature" version="0.0.0"/>
</requires>
<plugin
id="com.raytheon.uf.edex.plugin.grib.ogc"
download-size="0"
@ -41,7 +32,28 @@
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.wcs"
id="com.raytheon.uf.edex.plugin.madis.ogc"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.ogc.registry"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.madis.registry"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.plugin.obs.registry"
download-size="0"
install-size="0"
version="0.0.0"

View file

@ -17,23 +17,29 @@ Require-Bundle: net.opengis;bundle-version="1.0.2",
com.raytheon.uf.common.json;bundle-version="1.0.0",
com.sun.xml.bind;bundle-version="1.0.0",
com.raytheon.uf.common.status;bundle-version="1.12.1174",
com.raytheon.uf.common.datadelivery.registry;bundle-version="1.0.0",
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
com.raytheon.uf.common.registry.event;bundle-version="1.0.0",
com.raytheon.uf.common.datadelivery.retrieval;bundle-version="1.0.0",
com.raytheon.uf.common.datadelivery.harvester;bundle-version="1.0.0",
com.raytheon.uf.common.spatial;bundle-version="1.0.0",
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174"
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
ogc.tools.gml;bundle-version="1.0.2",
org.apache.commons.cxf,
org.eclipse.jetty;bundle-version="7.6.9",
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174"
Export-Package: com.raytheon.uf.edex.ogc.common,
com.raytheon.uf.edex.ogc.common.colormap,
com.raytheon.uf.edex.ogc.common.db,
com.raytheon.uf.edex.ogc.common.feature,
com.raytheon.uf.edex.ogc.common.filter,
com.raytheon.uf.edex.ogc.common.gml3_1_1,
com.raytheon.uf.edex.ogc.common.gml3_2_1,
com.raytheon.uf.edex.ogc.common.http,
com.raytheon.uf.edex.ogc.common.interfaces,
com.raytheon.uf.edex.ogc.common.jaxb,
com.raytheon.uf.edex.ogc.common.level,
com.raytheon.uf.edex.ogc.common.output,
com.raytheon.uf.edex.ogc.common.soap,
com.raytheon.uf.edex.ogc.common.spatial,
com.raytheon.uf.edex.ogc.common.time
Import-Package: javax.servlet,
javax.servlet.http,
org.apache.commons.logging
com.raytheon.uf.edex.ogc.common.stats,
com.raytheon.uf.edex.ogc.common.time,
com.raytheon.uf.edex.ogc.common.util
Import-Package: com.raytheon.uf.common.localization,
com.raytheon.uf.edex.plugin.dataset.urn,
org.apache.cxf.helpers

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wfs-soap="http://www.opengis.net/wfs/soap/2.0" xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2"
xmlns:wsntw-soap="http://docs.oasis-open.org/wsn/bw-2/soap"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://wsn.edex.uf.raytheon.com" xmlns:tns="http://wsn.edex.uf.raytheon.com">
<!-- ============================ Bindings Section ================================ -->
<wsdl:import namespace="http://docs.oasis-open.org/wsn/bw-2"
location="http://docs.oasis-open.org/wsn/bw-2.wsdl" />
<wsdl:binding name="NotificationConsumerSOAPBinding"
type="wsntw:NotificationConsumer">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Notify">
<soap:operation soapAction="" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<!-- ============================ Service Section ================================ -->
<wsdl:service name="wsn-consumer">
<wsdl:port name="wsn-SOAP-Port" binding="tns:NotificationConsumerSOAPBinding">
<soap:address location="http://0.0.0.0:8080/notify">http://0.0.0.0:8080/notify
</soap:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Some files were not shown because too many files have changed in this diff Show more