この章では、Oracle SpatialにおけるWeb Feature Service(WFS)のサポートについて説明します。この章の内容は次のとおりです。
この章では、Web Feature Serviceエンジンについて、クライアントとの関係およびデータベース・サーバーとの関係も含めて説明します。WFSはWebサービスとして実装され、Oracle Containers for Java(OC4J)にデプロイできます(Oracle Containers for Java(OC4J)はOracle Application Serverに同梱されています)。
WFSにはメタデータ層があります。この層では、WFSリクエストへの応答で必要とされるメタデータがデータベースに格納されます。メタデータには空間列が含まれており、Oracle Spatialのインタフェースを使用して空間列の問合せおよび処理が可能です。メタデータには、フィーチャの非空間属性と空間属性の関連付け、およびWeb Feature Serviceからクライアントに提供されるサービスも格納されます。
図15-1に、WFSのアーキテクチャを示します。
次に、図15-1について説明します。
WFSは、Oracle Application Server中間層のコンテナの一部です。
WFSでは、SOAP/XML形式のWFSリクエストおよびレスポンスを使用して、Webサービス・クライアントと通信できます。
WFSでは、データベースに対するJDBCコールを介して空間データおよびメタデータへのアクセスが実行されます。
データベースには、WFSのメタデータおよびデータとともにOracle Spatialが含まれます。
Webサービス・セキュリティ(WSS)は、セキュアなトランスポートを使用して実装されます。ユーザー識別子およびユーザー・ラベルはLDAPで管理され、中間層とWSSを組み合せて認証が行われます。Oracleのラベルベースのセキュリティは、フィーチャ・レベルでのユーザー権限の管理に使用されます。WSSの詳細は、第17章を参照してください。
WFSでは、リレーショナルおよびドキュメントベースのフィーチャ・タイプがサポートされます。
リレーショナル・フィーチャ・タイプでは、データベース表のコンテンツがフィーチャ・インスタンスとして公開されます。 リレーショナル・フィーチャ・タイプは、Oracle Spatialを使用して地理空間データを管理する場合や、Oracle Databaseを使用してその他のビジネス・データを管理する場合に適しています。 Spatial WFS実装は、特にWebサービスを使用して実装されたサービス指向アーキテクチャ(SOA)・システムにおける、データへのアクセス方法を提供します。
リレーショナル・フィーチャ・タイプの管理には、PL/SQL Application Program Interface(API)を使用します。PL/SQLパッケージのSDO_WFS_LOCKおよびSDO_WFS_PROCESS(第33章および第34章をそれぞれ参照)は、リレーショナル・フィーチャ・タイプを管理できます。
ドキュメントベース・フィーチャ・タイプでは、XMLスキーマベースのXMLコンテンツがフィーチャ・インスタンスとして公開されます。 ドキュメントベース・フィーチャ・タイプは、メイン・データ・ソースとしてXMLを使用する場合や、そのようなデータでOracle Spatialを使用しない場合に適しています。 このデータについては、Spatial WFS実装によって抽出されたジオメトリ・コンポーネントは、SDO_GEOMETRYタイプを使用して格納されます。残りのXMLコンポーネントはOracle XDBに格納され、適切なXMLIndex索引が作成されます。
ドキュメントベース・フィーチャ・タイプの管理には、Java API(15.4項を参照)を使用します。
これらのAPIを使用すると、次のような操作を実行できます。
フィーチャ・タイプのパブリッシュ
フィーチャ・タイプの削除(パブリッシュの解除)
WFSメタデータおよびフィーチャ・タイプに対する権限の付与および取消し
リレーショナル・フィーチャ・タイプの場合:フィーチャ表のロックの有効化およびロックの無効化(ドキュメントベース・フィーチャ・タイプではデフォルトでロックが有効化される)
機能のドキュメントは、機能のインスタンスを記述したドキュメントです。このドキュメントには、フィーチャ・タイプ(道路、河川など)およびサポートされる操作(挿入、削除など)のタイプが指定されます。
機能のドキュメントは、GetCapabilitiesリクエストに対するレスポンスとしてWFSサーバーで生成されます。WFSサーバーでは機能テンプレートを使用します。フィーチャ・タイプおよび操作に関する情報がこのテンプレートに追加されて、機能のドキュメントが作成されます。
クライアントがHTTP GETメソッドを使用してこの機能のドキュメントにアクセスするには、次のようにSOAPインタフェースまたはXMLインタフェースのいずれかを使用します。
SOAPインタフェースの場合は、oracle.spatial.ws.servlet.WFSServletを使用します。このサーブレットには、次の書式のアドレスでアクセスできます。
http://machine-name:port/SpatialWS-SpatialWS-context-root/wfsservlet?request=GetCapabilities&service=WFS&version=1.0.0
XMLインタフェースの場合は、oracle.spatial.ws.servlet.WFSXMLServletを使用します。このサーブレットには、次の書式のアドレスでアクセスできます。
http://machine-name:port/SpatialWS-SpatialWS-context-root/xmlwfsservlet?request=GetCapabilities&service=WFS&version=1.0.0
次に、前述の書式について説明します。
machine-nameは、OC4Jサーバーが実行されているシステムの名前です。
portは、OC4Jサーバーが実行されているポートの番号です。
SpatialWS-SpatialWS-context-rootは、SpatialのWebサービス・アプリケーションがマウントされるデフォルトのrootです。
wfsservletは、oracle.spatial.ws.servlet.WFSServletに対するservlet-mapping url-patternです。web.xmlファイルにデフォルトで指定されます。
xmlwfsservletは、oracle.spatial.ws.servlet.WFSXMLServletに対するservlet-mapping url-patternです。web.xmlファイルにデフォルトで指定されます。
この項では、次の各操作について、WFSエンジンへのフィーチャ・リクエストの一部と、各リクエストに対するレスポンスを示します。
GetCapabilities
DescribeFeatureType
GetFeature
GetFeatureWithLock
LockFeature
次のトランザクション・タイプを指定するサブ要素を含むトランザクション
Insert
Update
Delete
XMLリクエストとレスポンスの書式は、リレーショナルおよびドキュメントベースの両方のフィーチャ・タイプで同様のものが使用されます。この項のいくつかの例で、6.12項の例6-16で使用したCOLA_MARKETS_CS表に基づくリレーショナル・フィーチャを参照します。MKT_ID列には各フィーチャの一意の数値IDが含まれ、NAME列には各フィーチャの名前(cola_a、cola_b、cola_cまたはcola_d)が含まれ、SHAPE列には各フィーチャと関連付けられたジオメトリが含まれます。
例15-1は、指定した名前空間URLで、WFSという名前のWFSサーバーの機能を取得するリクエストです。このリクエストでは、機能のドキュメント(15.2.1項を参照)が戻されます。
例15-1 GetCapabilitiesリクエスト
<?xml version="1.0" ?> <GetCapabilities service="WFS" version="1.0.0" xmlns="http://www.opengis.net/wfs" />
例15-2は、例15-1のリクエストに対するレスポンスからの抜粋です。
例15-2 GetCapabilitiesのレスポンス
<WFS_Capabilities xmlns="http://www.opengis.net/wfs" version="1.0.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:myns="http://www.example.com/myns">
<Service>
<Name> Oracle WFS </Name>
<Title> Oracle Web Feature Service </Title>
<Abstract> Web Feature Service maintained by Oracle </Abstract>
<OnlineResource>http://localhost:8888/SpatialWS-SpatialWS-context-root/wfsservlet</OnlineResource>
</Service>
<Capability>
<Request>
<GetCapabilities>
<DCPType>
<HTTP>
<Get onlineResource="http://localhost:8888/SpatialWS-SpatialWS-context-root/wfsservlet"/>
</HTTP>
</DCPType>
<DCPType>
<HTTP>
<Post onlineResource="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort"/>
</HTTP>
</DCPType>
</GetCapabilities>
<DescribeFeatureType>
<SchemaDescriptionLanguage>
<XMLSCHEMA/>
</SchemaDescriptionLanguage>
<DCPType>
<HTTP>
<Post onlineResource="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort"/>
</HTTP>
</DCPType>
</DescribeFeatureType>
<GetFeature>
<ResultFormat>
<GML2/>
</ResultFormat>
<DCPType>
<HTTP>
<Post onlineResource="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort"/>
</HTTP>
</DCPType>
</GetFeature>
<GetFeatureWithLock>
<ResultFormat>
<GML2/>
</ResultFormat>
<DCPType>
<HTTP>
<Post onlineResource="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort"/>
</HTTP>
</DCPType>
</GetFeatureWithLock>
<Transaction>
<DCPType>
<HTTP>
<Post onlineResource="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort"/>
</HTTP>
</DCPType>
</Transaction>
<LockFeature>
<DCPType>
<HTTP>
<Post onlineResource="http://localhost:8888/SpatialWS-SpatialWS-context-root/SpatialWSSoapHttpPort"/>
</HTTP>
</DCPType>
</LockFeature>
</Request>
</Capability>
<FeatureTypeList>
<Operations>
<Insert/>
<Update/>
<Delete/>
<Query/>
<Lock/>
</Operations>
<FeatureType xmlns:myns="http://www.example.com/myns">
<Name> myns:COLA</Name>
<Title> LIST OF COLA MARKETS </Title>
<SRS> SDO:8307</SRS>
</FeatureType><FeatureType xmlns:myns="http://www.example.com/myns">
<Name> myns:COLAVIEW1 </Name>
<Title> LIST OF COLA MARKET VIEW </Title>
<SRS> SDO:8307</SRS>
</FeatureType><FeatureType xmlns:wfs="http://www.opengis.net/wfs">
<Name xmlns:myns="http://www.example.com/myns1">myns:SampleFeature</Name>
<Title>SAMPLE FEATURE</Title>
<SRS>EPSG:32615</SRS>
</FeatureType></FeatureTypeList>
<ogc:Filter_Capabilities xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Spatial_Capabilities>
<ogc:Spatial_Operators>
<ogc:BBOX/>
<ogc:Equals/>
<ogc:Disjoint/>
<ogc:Intersect/>
<ogc:Touches/>
<ogc:Crosses/>
<ogc:Within/>
<ogc:Contains/>
<ogc:Overlaps/>
<ogc:Beyond/>
<ogc:DWithin/>
</ogc:Spatial_Operators>
</ogc:Spatial_Capabilities>
<ogc:Scalar_Capabilities>
<ogc:Logical_Operators/>
<ogc:Comparison_Operators>
<ogc:Simple_Comparisons/>
<ogc:Like/>
<ogc:Between/>
<ogc:NullCheck/>
</ogc:Comparison_Operators>
<ogc:Arithmetic_Operators>
<ogc:Simple_Arithmetic/>
</ogc:Arithmetic_Operators>
</ogc:Scalar_Capabilities>
</ogc:Filter_Capabilities>
</WFS_Capabilities>
例15-3は、COLAという名前のフィーチャ・タイプを記述するリクエストです。
例15-3 DescribeFeatureTypeリクエスト
<?xml version="1.0" ?> <wfs:DescribeFeatureType service="WFS" version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:myns="http://www.example.com/myns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd"> <wfs:TypeName>myns:COLA</wfs:TypeName> </wfs:DescribeFeatureType>
例15-4は、例15-3のリクエストに対するレスポンスです。レスポンスはXMLスキーマ定義(XSD)です。
例15-4 DescribeFeatureTypeのレスポンス
<xsd:schema targetNamespace="http://www.example.com/myns" xmlns:wfs="http://www.opengis.net/wfs" xmlns:myns="http://www.example.com/myns" xmlns:gml="http://www.opengis.net/gml" elementFormDefault="qualified" version="1.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://localhost:8888/examples/servlets/xsds/feature.xsd"/>
<xsd:element name="COLA" type="myns:COLAType" substitutionGroup="gml:_Feature"/>
<xsd:complexType name="COLAType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element name="MKT_ID" type="xsd:double"/>
<xsd:element name="NAME" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="SHAPE" type="gml:PolygonMemberType" nillable="true"/>
</xsd:sequence>
<xsd:attribute name="fid" type="xsd:double"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
例15-5は、MKT_ID値が2より大きくNAME値がcola_cであるか、MKT_ID値が3より大きくNAME値がcola_dであるタイプCOLAのフィーチャのMKT_ID、NAMEおよびSHAPEプロパティを取得するリクエストです。
例15-5 GetFeatureリクエスト
<?xml version="1.0" ?>
<wfs:GetFeature
service="WFS"
version="1.0.0"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:myns="http://www.example.com/myns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd">
<wfs:Query typeName="myns:COLA">
<ogc:PropertyName>myns:MKT_ID</ogc:PropertyName>
<ogc:PropertyName>myns:NAME</ogc:PropertyName>
<ogc:PropertyName>myns:SHAPE</ogc:PropertyName>
<ogc:Filter>
<ogc:And>
<ogc:And>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName>
<ogc:Literal> 2 </ogc:Literal>
</ogc:PropertyIsGreaterThan>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>myns:COLA/myns:NAME</ogc:PropertyName>
<ogc:Literal>cola_c</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
<ogc:Or>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName>
<ogc:Literal>3</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>myns:COLA/myns:NAME</ogc:PropertyName>
<ogc:Literal>cola_d</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Or>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
例15-6は、例15-5のリクエストに対するレスポンスです。
例15-6 GetFeatureのレスポンス
<?xml version = '1.0' encoding = 'UTF-8'?>
<wfs:FeatureCollection xsi:schemaLocation="http://www.example.com/myns http://localhost:8888/wfsservlet?featureTypeId=1 http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gml:boundedBy xmlns:gml="http://www.opengis.net/gml">
<gml:Box srsName="SDO:8307">
<gml:coordinates>3.0,3.0 6.0,5.0</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember xmlns:gml="http://www.opengis.net/gml">
<myns:COLA fid="3" xmlns:myns="http://www.example.com/myns">
<myns:MKT_ID>3</myns:MKT_ID>
<myns:NAME>cola_c</myns:NAME>
<myns:SHAPE>
<gml:Polygon srsName="SDO:8307" xmlns:gml="http://www.opengis.net/gml">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">3.0,3.0 6.0,3.0
6.0,5.0 4.0,5.0 3.0,3.0 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</myns:SHAPE>
</myns:COLA>
</gml:featureMember>
</wfs:FeatureCollection>
例15-7は、MKT_ID値が3であるタイプCOLAのフィーチャのMKT_ID、NAMEおよびSHAPEプロパティを取得し、そのフィーチャをロックするリクエストです。
例15-7 GetFeatureWithLockリクエスト
<?xml version="1.0" ?>
<wfs:GetFeatureWithLock
service="WFS"
version="1.0.0"
expiry="5"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:myns="http://www.example.com/myns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<wfs:Query typeName="myns:COLA">
<ogc:PropertyName>myns:MKT_ID</ogc:PropertyName>
<ogc:PropertyName>myns:NAME</ogc:PropertyName>
<ogc:PropertyName>myns:SHAPE</ogc:PropertyName>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName>
<ogc:Literal> 3 </ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeatureWithLock>
例15-8は、例15-7のリクエストに対するレスポンスです。
例15-8 GetFeatureWithLockのレスポンス
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" lockId="1" xsi:schemaLocation="http://www.example.com/myns http://localhost:8888/SpatialWS-SpatialWS-context-root/wfsservlet?featureTypeId=1 " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gml:boundedBy xmlns:gml="http://www.opengis.net/gml">
<gml:Box srsName="SDO:8307">
<gml:coordinates>3.0,3.0 6.0,5.0</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember xmlns:gml="http://www.opengis.net/gml">
<myns:COLA xmlns:myns="http://www.example.com/myns" fid="3">
<myns:MKT_ID>3</myns:MKT_ID>
<myns:NAME>cola_c</myns:NAME>
<myns:SHAPE>
<gml:Polygon srsName="SDO:8307">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">3.0,3.0 6.0,3.0 6.0,5.0 4.0,5.0 3.0,3.0 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</myns:SHAPE>
</myns:COLA>
</gml:featureMember>
</wfs:FeatureCollection>
例15-9は、MKT_ID値が2のフィーチャをロックするリクエストです。
例15-9 LockFeatureリクエスト
<?xml version="1.0" ?>
<wfs:LockFeature
service="WFS"
version="1.0.0"
expiry="5"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:myns="http://www.example.com/myns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<wfs:Lock typeName="myns:COLA">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName>
<ogc:Literal> 2 </ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Lock>
</wfs:LockFeature>
例15-10は、例15-9のリクエストに対するレスポンスです。
例15-10 LockFeatureのレスポンス
<wfs:WFS_LockFeatureResponse xmlns:wfs="http://www.opengis.net/wfs"> <wfs:LockId>2</wfs:LockId> </wfs:WFS_LockFeatureResponse>
例15-11は、WFSという名前のWFSサービスに関連付けられた表に、MKT_IDが5でNAMEがcola_eのフィーチャを挿入するリクエストです。
例15-11 Insertリクエスト
<?xml version="1.0"?>
<wfs:Transaction version="1.0.0" handle="TX01" service="WFS" xmlns="http://www.e
xample.com/myns" xmlns:myns="http://www.example.com/myns" xmlns:gml="http://ww
w.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.
opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<wfs:Insert handle="INSERT01" >
<myns:COLA fid="5" xmlns:myns="http://www.example.com/myns">
<myns:MKT_ID>5</myns:MKT_ID>
<myns:NAME>cola_e</myns:NAME>
<myns:SHAPE>
<gml:Polygon srsName="SDO:8307" xmlns:gml="http://www.opengis.net/gml">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">1.0,3.0 6.0,3.0 6.0,5.0 4.0,5.0 1.0,3.0 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</myns:SHAPE>
</myns:COLA>
</wfs:Insert>
</wfs:Transaction>
例15-12は、例15-11のリクエストに対するレスポンスです。
例15-12 Insertのレスポンス
<?xml version = '1.0' encoding = 'UTF-8'?>
<wfs:WFS_TransactionResponse version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs">
<wfs:InsertResult handle="INSERT01">
<ogc:FeatureId fid="5" xmlns:ogc="http://www.opengis.net/ogc"/>
</wfs:InsertResult>
<wfs:TransactionResult handle="TX01">
<wfs:Status>
<wfs:SUCCESS/>
</wfs:Status>
</wfs:TransactionResult>
</wfs:WFS_TransactionResponse>
例15-13は、WFSという名前のWFSサービスに関連付けられた表に含まれるフィーチャのうち、MKT_IDが2より大きく4より小さい、かつNAMEがNULL以外のフィーチャを更新するリクエストです。このリクエストには、指定したフィーチャのNAME値をcola_clに設定することが指定されています。
例15-13 Updateリクエスト
<?xml version="1.0"?>
<wfs:Transaction version="1.0.0" handle="TX01" service="WFS" xmlns="http://www.example.com/myns"
xmlns:myns="http://www.example.com/myns" xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.
opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<wfs:Update handle="UPDATE1" typeName="myns:COLA" >
<wfs:Property>
<wfs:Name>myns:COLA/myns:NAME</wfs:Name>
<wfs:Value>cola_c1</wfs:Value>
</wfs:Property>
<ogc:Filter>
<ogc:And>
<ogc:And>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName>
<ogc:Literal> 2 </ogc:Literal>
</ogc:PropertyIsGreaterThan>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName>
<ogc:Literal> 4 </ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:And>
<ogc:Not>
<ogc:PropertyIsNull>
<ogc:PropertyName>myns:COLA/myns:NAME</ogc:PropertyName>
</ogc:PropertyIsNull>
</ogc:Not>
</ogc:And>
</ogc:Filter>
</wfs:Update>
</wfs:Transaction>
例15-14は、例15-13のリクエストに対するレスポンスです。
例15-14 Updateのレスポンス
<?xml version = '1.0' encoding = 'UTF-8'?>
<wfs:WFS_TransactionResponse version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs">
<wfs:TransactionResult handle="TX01">
<wfs:Status>
<wfs:SUCCESS/>
</wfs:Status>
</wfs:TransactionResult>
</wfs:WFS_TransactionResponse>
例15-15は、WFSという名前のWFSサービスに関連付けられた表に含まれるフィーチャのうち、MKT_IDが3より大きくNAMEがcola_eのフィーチャおよびNAMEがNULL以外のフィーチャを削除するリクエストです。
例15-15 Deleteリクエスト
<?xml version="1.0"?>
<wfs:Transaction version="1.0.0" handle="TX01" service="WFS" xmlns="http://www.example.com/myns"
xmlns:myns="http://www.example.com/myns" xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.
opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<wfs:Delete handle="DELETE1" typeName="myns:COLA" >
<ogc:Filter>
<ogc:And>
<ogc:And>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName>
<ogc:Literal> 3 </ogc:Literal>
</ogc:PropertyIsGreaterThan>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>myns:COLA/myns:NAME</ogc:PropertyName>
<ogc:Literal> cola_e </ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
<ogc:Not>
<ogc:PropertyIsNull>
<ogc:PropertyName>myns:COLA/myns:NAME</ogc:PropertyName>
</ogc:PropertyIsNull>
</ogc:Not>
</ogc:And>
</ogc:Filter>
</wfs:Delete>
</wfs:Transaction>
SDO_WFS_PROCESSおよびSDO_WFS_LOCKパッケージに含まれるPL/SQL APIに加え、Java APIを使用してフィーチャ・タイプのパブリッシュおよび削除を行ったり、フィーチャ・タイプおよびWFSメタデータ表へのアクセス権限の付与および取消しを行うことができます。
この項では、oracle.spatial.wfs.WFSAdminクラスに含まれる各メソッドについての基本的な参照情報を説明します。ここでは、メソッドをアルファベット順に記載しています。
createXMLTableIndexメソッドは、ドキュメントベース・フィーチャ・タイプのインスタンスにSYS.XMLTABLEINDEXの索引を作成するメソッドです。このメソッドの書式は次のとおりです。
public static void createXMLTableIndex(
OracleConnection conn,
String ftNSUrl,
String ftName) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
ftNSUrlは、フィーチャ・タイプの名前空間のURLです。
ftNameは、フィーチャ・タイプの名前です。
dropFeatureTypeメソッドは、WFSリポジトリからフィーチャ・タイプを削除するメソッドです。このメソッドの書式は次のとおりです。
public static void dropFeatureType(
OracleConnection conn,
String ftNSUrl,
String ftName) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
ftNSUrlは、フィーチャ・タイプの名前空間のURLです。
ftNameは、フィーチャ・タイプの名前です。
dropXMLTableIndexメソッドは、ドキュメントベース・フィーチャ・タイプのインスタンスに対して作成されたSYS.XMLTABLEINDEX型の索引を削除するメソッドです。このメソッドの書式は次のとおりです。
public static void dropXMLTableIndex(
OracleConnection conn,
String ftNSUrl,
String ftName) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
ftNSUrlは、フィーチャ・タイプの名前空間のURLです。
ftNameは、フィーチャ・タイプの名前です。
getIsXMLTableIndexCreatedメソッドは、ドキュメントベース・フィーチャ・タイプにSYS.XMLTABLEINDEX型の索引が作成されている場合はブール値TRUEを戻し、そのような索引が作成されていない場合はブール値FALSEを戻すメソッドです。このメソッドの書式は次のとおりです。
public static boolean getIsXMLTableIndexCreated(
OracleConnection conn,
String ftNSUrl,
String ftName) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
ftNSUrlは、フィーチャ・タイプの名前空間のURLです。
ftNameは、フィーチャ・タイプの名前です。
grantFeatureTypeToUserメソッドは、フィーチャ・タイプへのアクセス権限をデータベース・ユーザーに付与するメソッドです。このメソッドの書式は次のとおりです。
public static void grantFeatureTypeToUser(
OracleConnection conn,
String typeNS,
String typeName,
String usrName) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
typeNSは、フィーチャ・タイプの名前空間のURLです。
typeNameは、フィーチャ・タイプの名前です。
usrNameは、データベース・ユーザーの名前です。
grantMDAccessToUserメソッドは、WFSメタデータへのアクセス権限をデータベース・ユーザーに付与するメソッドです。このメソッドの書式は次のとおりです。
public static void grantMDAccessToUser(
OracleConnection conn,
String usrName) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
usrNameは、データベース・ユーザーの名前です。
publishFeatureTypeメソッドは、ドキュメントベース・フィーチャ・タイプをパブリッシュするメソッドです。つまり、このメソッドによって、フィーチャ・タイプに関連するメタデータが登録されます。このメソッドの書式は次のとおりです。
public static void publishFeatureType(OracleConnection conn,
XMLType featureTypeMD) throws SQLException , WFSException;
public static void publishFeatureType(OracleConnection conn,
XMLType schemaDocXt,
XMLType featureDescXt,
ArrayList<String> docIdPaths,
String primarySpatialPath,
String featureMemberNS,
String featureMemberName,
String ftNSUrl,
String ftName,
ArrayList<PathInfo> spatialPaths,
ArrayList<PathInfo> mandatoryPaths,
ArrayList<PathInfo> tsPaths,
ArrayList<GeomMetaInfo> sdoMetaInfo,
String srsNS,
String srsNSAlias) throws SQLException;
public static void publishFeatureType(OracleConnection conn,
XMLType schemaDocXt,
XMLType featureDescXt,
ArrayList<String> docIdPaths,
String primarySpatialPath,
String featureMemberNS,
String featureMemberName,
String ftNSUrl,
String ftName,
ArrayList<PathInfo> spatialPaths,
ArrayList<PathInfo> mandatoryPaths,
ArrayList<PathInfo> tsPaths,
ArrayList<GeomMetaInfo> sdoMetaInfo,
String srsNS,
String srsNSAlias,
String ftXSDRefId) throws SQLException;
public static void publishFeatureType(OracleConnection conn,
XMLType schemaDocXt,
XMLType featureDescXt,
ArrayList<String> docIdPaths,
String primarySpatialPath,
String featureMemberNS,
String featureMemberName,
String ftNSUrl,
String ftName,
ArrayList<PathInfo> spatialPaths,
ArrayList<PathInfo> mandatoryPaths,
ArrayList<PathInfo> tsPaths,
ArrayList<GeomMetaInfo> sdoMetaInfo,
String srsNS,
String srsNSAlias,
String ftXSDRefId,
boolean genSpatialIndex,
boolean lockEnable) throws SQLException;
public static void publishFeatureType(OracleConnection conn,
XMLType schemaDocXt,
XMLType featureDescXt,
ArrayList<String> docIdPaths,
String primarySpatialPath,
String featureMemberNS,
String featureMemberName,
String ftNSUrl,
String ftName,
ArrayList<PathInfo> spatialPaths,
ArrayList<PathInfo> mandatoryPaths,
ArrayList<PathInfo> tsPaths,
ArrayList<GeomMetaInfo> sdoMetaInfo,
String srsNS,
String srsNSAlias,
String ftXSDRefId,
boolean genSpatialIndex,
boolean lockEnable,
ArrayList<PathInfo> numPaths,
ArrayList<PathInfo> idxPaths,
ArrayList<String[]> idxPathTypes,
boolean genXMLIndex) throws SQLException;
public static void publishFeatureType(OracleConnection conn,
XMLType schemaDocXt,
XMLType featureDescXt,
ArrayList<String> docIdPaths,
String primarySpatialPath,
String featureMemberNS,
String featureMemberName,
String ftNSUrl,
String ftName,
ArrayList<PathInfo> spatialPaths,
ArrayList<PathInfo> mandatoryPaths,
ArrayList<PathInfo> tsPaths,
ArrayList<GeomMetaInfo> sdoMetaInfo,
String srsNS,
String srsNSAlias,
String ftXSDRefId,
boolean genSpatialIndex,
boolean lockEnable,
ArrayList<PathInfo> numPaths,
ArrayList<PathInfo> idxPaths,
ArrayList<String[]> idxPathTypes,
boolean genXMLIndex,
String featureCollectionNS,
String featureCollectionName,
boolean isGML3) throws SQLException;
public static void publishFeatureType(OracleConnection conn,
XMLType schemaDocXt,
XMLType featureDescXt,
ArrayList<String> docIdPaths,
String primarySpatialPath,
String featureMemberNS,
String featureMemberName,
String ftNSUrl,
String ftName,
ArrayList<PathInfo> spatialPaths,
ArrayList<PathInfo> mandatoryPaths,
ArrayList<PathInfo> tsPaths,
ArrayList<GeomMetaInfo> sdoMetaInfo,
String srsNS,
String srsNSAlias,
String ftXSDRefId,
boolean genSpatialIndex,
boolean lockEnable,
ArrayList<PathInfo> numPaths,
ArrayList<PathInfo> idxPaths,
ArrayList<String[]> idxPathTypes,
boolean genXMLIndex,
String featureCollectionNS,
String featureCollectionName,
boolean isGML3,
CollectionPathInfo collPathInfo) throws SQLException;
public static void publishFeatureType(OracleConnection conn,
XMLType schemaDocXt,
XMLType featureDescXt,
ArrayList<String> docIdPaths,
String primarySpatialPath,
String featureMemberNS,
String featureMemberName,
String ftNSUrl,
String ftName,
ArrayList<PathInfo> spatialPaths,
ArrayList<PathInfo> mandatoryPaths,
ArrayList<PathInfo> tsPaths,
ArrayList<GeomMetaInfo> sdoMetaInfo,
String srsNS,
String srsNSAlias,
String ftXSDRefId,
boolean genSpatialIndex,
boolean lockEnable,
ArrayList<PathInfo> numPaths,
ArrayList<PathInfo> idxPaths,
ArrayList<String[]> idxPathTypes,
boolean genXMLIndex,
String featureCollectionNS,
String featureCollectionName,
boolean isGML3,
CollectionPathInfo collPathInfo,
boolean hasMultipleSRSNS) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
featureTypeMDは、フィーチャ・タイプのパス登録メタデータです。このメタデータは、wstype_md.xsdファイルに指定されたfeatureTypeMd要素定義に準拠している必要があります。フィーチャ・タイプのパス登録メタデータのXMLの例は、ft_metadata.xmlに用意されています。これらのファイルは、src/data/パスの下にあるws_client.jarデモ・ファイル(10.4項を参照)に含まれています。フィーチャ・タイプをパブリッシュする例の使用方法は、Readme.txtファイルを参照してください。このファイルはsrc/パスの下にあるws_client.jarに含まれています。
schemaDocXtは、フィーチャ・タイプのXMLスキーマ定義(XSD)です。
featureDescXtは、フィーチャ・タイプ記述のXMLスキーマ定義(XSD)で、Capabilitiesドキュメントに含められます。
docIdPathsは、ドキュメントIDパス要素のリストです。各要素はString型です。
primarySpatialPathは、結果に含まれる境界ボックスの計算に使用されるプライマリ空間パスです。
featureMemberNSは、フィーチャ・メンバーの名前空間です。
featureMemberNameは、フィーチャ・メンバーの名前です。
ftNSUrlは、フィーチャ・タイプの名前空間のURLです。
ftNameは、フィーチャ・タイプの名前です。
spatialPathsは、フィーチャ・タイプに含まれる空間パスのリストです。これは、oracle.spatial.ws.PathInfoクラス(15.4.7.1項を参照)のArrayListです。
mandatoryPathsは、フィーチャ・タイプに含まれる必須パスのリストです。これは、oracle.spatial.ws.PathInfoクラス(15.4.7.1項を参照)のArrayListです。
tsPathsは、フィーチャ・タイプに含まれる時間に関連したパスのリストです(date、dateTime、gYear、gMonth、gDay、gMonthDay、gYearMonthなど)。これは、oracle.spatial.ws.PathInfoクラス(15.4.7.1項を参照)のArrayListです。
sdoMetaInfoは、空間パスの空間メタデータ情報です。これは、oracle.spatial.ws.GeomMetaInfoクラス(15.4.7.1項を参照)のArrayListです。
srsNSは、空間パス内のデータと関連付けられた空間参照システム(座標系)のユーザー定義の名前空間です。この名前空間は(指定されている場合)、GetFeatureリクエストに対する回答として生成されるFeatureCollectionの<boundedBy>要素内のsrsName属性を生成するときにも使用されます。
srsNSAliasは、空間パス内のデータと関連付けられた空間参照システム(座標系)の名前空間の別名です。
ftXSDRefIdは、1つのXSDファイル内に複数のフィーチャ・タイプが定義されている場合は、グループ・フィーチャ・タイプのXMLスキーマ定義ファイル名(文字列)です。このパラメータは、グループXSD定義をWFSメタデータ内に格納する際に使用されると、その後、グループ・フィーチャ・タイプXSDファイル内にスキーマが定義されている複数のフィーチャ・タイプから参照されます。
genSpatialIndexは、ブール値です。TRUEの場合は、タイプの作成時に空間索引がフィーチャ・タイプ上に作成されます。FALSEの場合、空間索引の作成は行われません。
lockEnableは、ブール値です。TRUEの場合は、タイプの作成時にフィーチャ・タイプ表(このフィーチャ・タイプのインスタンスが格納されるシステム生成の基礎表)のロックが有効化されます。FALSEの場合は、フィーチャ・タイプ表のロックは有効化されません。lockEnableがTRUEの場合は、フィーチャ・タイプのWFSデータ表のWFSトランザクション・ロックが有効化されます。(このデータ表はフィーチャ・タイプのパブリッシュ時に自動生成されます。)
numPathsは、フィーチャ・タイプに含まれる数値(NUMBER、INTEGERなど)に関連するパスのリストです。これは、oracle.spatial.ws.PathInfoクラス(15.4.7.1項を参照)のArrayListです。
idxPathsは、索引パスのリストです。 これは、SYS.XMLTABLEINDEX型の索引の作成時に、索引が作成されるパスのリストです。これは、oracle.spatial.ws.PathInfoクラス(15.4.7.1項を参照)のArrayListです。
idxPathTypesは、各索引パスの情報を指定します。このパスには、string[3]の次の各要素が含まれます。string[0]にはタイプ名、string[1]にはタイプの形式(長さのタイプなど)、string[2]には、Bツリー索引と一意索引のいずれを作成するか、または索引の作成を行わないかの指定(WFSAdmin.BTREE、WFSAdmin.UNIQUEまたはNULL)が含まれます。
genXMLIndexは、ブール値です。TRUEの場合は、SYS.XMLTABLEINDEX型の索引がドキュメントベース・フィーチャ・タイプ上に作成されます。FALSEの場合は、SYS.XMLTABLEINDEX型の索引はドキュメントベース・フィーチャ・タイプ上に作成されません。現時点で索引を作成しないことを選択する場合でも、createXMLTableIndexメソッド(15.4.1項を参照)を使用して後から作成できます。
featureCollectionNSは、フィーチャ・コレクションの名前空間です。
featureCollectionNameは、フィーチャ・コレクションの名前です。
isGML3は、ブール値です。TRUEは、このフィーチャ・タイプのインスタンスに含まれるジオメトリがGML3.1.1に準拠していることを表します。FALSEは、このフィーチャ・タイプのインスタンスに含まれるジオメトリがGML 2.1.2に準拠していることを表します。
collPathInfoは、空間コレクションのパス情報です。
hasMultipleSRSNSは、ブール値です。TRUEは、このフィーチャ・タイプから複数のユーザー定義の空間参照システムの名前空間が参照されることを表します。FALSEは、このフィーチャ・タイプから複数のユーザー定義の空間参照システムの名前空間は参照されないことを表します。
この項では、publishFeatureTypeメソッドのパラメータ定義で使用されるいくつかのクラスについて説明します。
oracle.spatial.ws.PathElementはPathElement名前空間およびPathElement名の2つのStringオブジェクトを含むJavaクラスです。このクラスには、getValue()メソッドが含まれ、このメソッドからは文字列形式のPathElementオブジェクトが戻されます。このクラスの書式は次のとおりです。
public class PathElement {
// Set namespace and name information for a PathElement.
public void set(String ns, String name);
//Get a string value for the PathElement object.
public String getValue() ;
}
oracle.spatial.ws.Pathは、パスを構成する順序付けされたPathElementオブジェクトのリストを含むJavaクラスです。たとえば、XPathがmyns:A/myns:Bである場合、myns:Aおよびmyns:BがPathElementオブジェクトということになります。このクラスには、getValue()メソッドが含まれ、このメソッドからは文字列形式のPathオブジェクトが戻されます。このクラスの書式は次のとおりです。
public class Path {
//Add a PathElement.
public void add(PathElement p) ;
//Get a string Value for the Path object.
public String getValue() ;
}
oracle.spatial.ws.PathInfoは、パスの関連付けおよびメタデータの情報など、パスまたはパスのリストに関する情報を含むコンテナ・クラスです。このクラスの書式は次のとおりです。
public class PathInfo {
// Set number of occurrences for the Path. Default value is 1. Number of
// occurrences > 1 in case of arrays.
public void setNumOfOccurrences(int i) ;
// Get number of occurrences for the Path.
public int getNumOfOccurrences();
// Add a path, in case PathInfo has multiple paths associated via a
// choice association
public void addPath(Path p) ;
// Add path type information. This is relevant for time-related Paths
// (for example, date, dateTime, gDay, gMonth, gYear, gMonthDay,
// gYearMonth, duration, or time).
public void addPathType(String t) ;
// Add a PathInfo type. This can be PathInfo.CHOICE or
// PathInfo.DEFAULT or PathInfo.COLLECTION.
// PathInfo.CHOICE - means that the list of paths in this PathInfo are
// related to each other via choice association. For example, we may have
// a list of Spatial Paths, which are associated with one another via choice.
// So, only one of these path can occur in a feature instance/document.
// PathInfo.COLLECTION - means the list of paths in this PathInfo are part
// of a collection (currently spatial collections are
// supported) which will be indexed.
// Default value is PathInfo.DEFAULT for one Path or a finite array Paths.
// @param t PathInfo type information. PathInfo.CHOICE or
// PathInfo.DEFAULT or PathInfo.COLLECTION
public void addPathInfoType(int t) ;
// Returns a string representation for PathInfo content.
public String getPathContent() ;
// Returns Path type information (for example, date, dateTime, gDay, gMonth,
// gYear, gMonthDay, gYearMonth, duration, or time).
public String getPathType() ;
// Returns a string representation for PathInfo path content.
// param i The index of the path in the PathInfo whose path content needs to
// be returned
// @return a string representation for PathInfo path content
public String getCollectionPathContent(int i);
// Returns number of paths in the PathInfo.
// @return number of paths in the PathInfo which is of type PathInfo.COLLECTION
// if PathInfo is not of type PathInfo.COLLECTION returns -1
public int getCollectionPathContentSize();
}
oracle.spatial.ws.CollectionPathInfoは、PathInfoオブジェクトのコレクションに関する情報を含むコンテナ・クラスです。このコレクションに含まれる各PathInfoオブジェクトは、索引付けされて検索対象になる空間パスのグループを表します。このクラスは、フィーチャ・タイプおよびレコード・タイプ内のコレクションをベースにした空間コンテンツを参照するパスの登録に使用されます。このクラスの書式は次のとおりです。
public class CollectionPathInfo {
/**
* Add a PathInfo.
* @param p PathInfo to be added
* @param g geometry related metadata for PathInfo to be added
*/
public void addPathInfo(PathInfo p, GeomMetaInfo g) ;
/**
* Get a PathInfo.
* @param i index of the PathInfo to be retrieved
*/
public PathInfo getPathInfo(int i) ;
/**
* Get geometry related metadata for a certain PathInfo.
* @param i index of the PathInfo whose geomMetaInfo is to be retrieved
*/
public GeomMetaInfo getGeomMetaInfo(int i) ;
/**
* Get all PathInfo objects in this CollectionPathInfo.
*/
public ArrayList<PathInfo> getPathInfos() ;
}
oracle.spatial.ws.GeomMetaInfoは、フィーチャ・タイプ内の空間パスに対応する次元関連の情報を含むクラスです。この情報には、次元名、下限および上限、許容差および座標系(SRID)が含まれます。このクラスの書式は次のとおりです。
public class GeomMetaInfo {
// Default constructor. Creates a GeomMetaInfo object with number of
// dimensions equal to 2.
public GeomMetaInfo() ;
// Creates a GeomMetaInfo object of a specified number of dimensions.
// Parameter numOfDimensions is the number of dimensions represented
// in the GeomMetaInfo object.
// Note: max number of dimensions supported is 4.
public GeomMetaInfo(int numOfDimensions) throws
ArrayIndexOutOfBoundsException ;
//Set Dimension Name.
// Parameter index represents the dimension index which needs to be set.
// Parameter val is dimension name value.
public void setDimName(int index, String val) throws
ArrayIndexOutOfBoundsException ;
// Set Dimension Lower Bound.
// Parameter index represents the dimension index which needs to be set.
// Parameter val is dimension lower bound value.
public void setLB(int index, double val) throws
ArrayIndexOutOfBoundsException ;
// Set Dimension Upper Bound
// Parameter index represents the dimension index which needs to be set.
// Parameter val is dimension upper bound value
public void setUB(int index, double val) throws
ArrayIndexOutOfBoundsException ;
// Set Dimension tolerance value.
// Parameter index represents the dimension index which needs to be set.
// Parameter val is dimension tolerance value.
public void setTolerance(int index, double val) throws
ArrayIndexOutOfBoundsException ;
// Set Coordinate Reference System Identifier
public void setSRID (int val) ;
// Get dimension Name.
// Parameter index represents the dimension index whose name needs to be
// returned. This method returns the dimension name for the given index.
public String getDimName(int index) throws
ArrayIndexOutOfBoundsException ;
// Get dimension lower bound.
// Parameter index represents the dimension index whose lower bound needs
// to be returned.
// This method returns the lower bound for the given index.
public double getLB(int index) throws ArrayIndexOutOfBoundsException ;
// Get dimension upper bound.
// Parameter index represents the dimension index whose upper bound needs
// to be returned.
// This method returns the upper bound for the given index.
public double getUB(int index) throws ArrayIndexOutOfBoundsException ;
// Get dimension tolerance.
// Parameter index represents the dimension index whose tolerance needs
// to be returned.
// This method returns the tolerance value for the given index.
public double getTolerance(int index) throws
ArrayIndexOutOfBoundsException ;
// Get coordinate system (spatial reference system) identifier.
public int getSRID () ;
// Get number of dimensions represented by this GeomMetaInfo object.
public int getNumOfDimensions() ;
// Sets the spatial index dimension parameter. By default it is 2.
// return Coordinate Reference System Identifier value
public int setSpatialIndexDimension(int d) ;
// Get the spatial index dimension parameter.
// return number of dimensions
public int getSpatialIndexDimension() ;
// Sets the user spatial srs namespace refered by this GeomMetaInfo object.
// Needs to be specified if multiple srs namespace are refered within the same
//feature or record type.
public void setSRSNS(String s) ;
// Gets the user defined spatial srs namespace refered by this
// GeomMetaInfo object.
public String getSRSNS() ;
// Sets the user defined spatial srs namespace alias refered by this
// GeomMetaInfo object.
public void setSRSNSAlias (String s) ;
// Gets the user defined spatial srs namespace alias refered by this
// GeomMetaInfo object.
public String getSRSNSAlias () ;
}
revokeFeatureTypeFromUserメソッドは、フィーチャ・タイプへのアクセス権限をデータベース・ユーザーから取り消すメソッドです。このメソッドの書式は次のとおりです。
public static void revokeFeatureTypeFromUser(
OracleConnection conn,
String typeNS,
String typeName,
String usrName) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
typeNSは、フィーチャ・タイプの名前空間のURLです。
typeNameは、フィーチャ・タイプの名前です。
usrNameは、データベース・ユーザーの名前です。
revokeMDAccessFromUserメソッドは、WFSメタデータへのアクセス権限をデータベース・ユーザーから取り消すメソッドです。このメソッドの書式は次のとおりです。
public static void revokeMDAccessFromUser(
OracleConnection conn,
String usrName) throws SQLException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
usrNameは、データベース・ユーザーの名前です。
setXMLTableIndexInfoメソッドは、索引を作成するオプションを使用してドキュメントベース・フィーチャ・タイプのXMLTableIndex索引の情報を更新します。このメソッドの書式は次のとおりです。
|
注意: XMLTableIndex索引がすでに存在する場合は、setXMLTableIndexInfoメソッドをコールする前に、(dropXMLTableIndexメソッドを使用して)索引を削除する必要があります。 |
public static void setXMLTableIndexInfo(OracleConnection conn, String ftNSUrl, String ftName, ArrayList<PathInfo> idxPaths, ArrayList<String[]> idxPathTypes, boolean genXMLIndex) throws SQLException , WFSException;
connは、DBAロールが付与されたユーザー用のOracle Database接続です。
ftNSUrlは、フィーチャ・タイプの名前空間のURLです。
ftNameは、フィーチャ・タイプの名前です。
idxPathsは、索引パスのリストです。 これは、SYS.XMLTABLEINDEX型の索引の作成時に、索引が作成されるパスのリストです。これは、oracle.spatial.ws.PathInfoクラス(15.4.7.1項を参照)のArrayListです。
idxPathTypesは、各索引パスの情報を指定します。このパスには、string[3]の次の各要素が含まれます。string[0]にはタイプ名、string[1]にはタイプの形式(長さのタイプなど)、string[2]には、Bツリー索引と一意索引のいずれを作成するか、または索引の作成を行わないかの指定(WFSAdmin.BTREE、WFSAdmin.UNIQUEまたはNULL)が含まれます。
genXMLIndexは、ブール値です。TRUEの場合は、SYS.XMLTABLEINDEX型の索引がドキュメントベース・フィーチャ・タイプ上に作成されます。FALSEの場合は、SYS.XMLTABLEINDEX型の索引はドキュメントベース・フィーチャ・タイプ上に作成されません。現時点で索引を作成しないことを選択する場合でも、createXMLTableIndexメソッド(15.4.1項を参照)を使用して後から作成できます。