📄 capabilitiestransformer.java
字号:
end("ows:ServiceIdentification");
}
/**
* Encodes the ows:ServiceProvider element.
* <p>
* <pre>
* <complexType>
* <sequence>
* <element name="ProviderName" type="string">
* <annotation>
* <documentation>A unique identifier for the service provider organization. </documentation>
* </annotation>
* </element>
* <element name="ProviderSite" type="ows:OnlineResourceType" minOccurs="0">
* <annotation>
* <documentation>Reference to the most relevant web site of the service provider. </documentation>
* </annotation>
* </element>
* <element name="ServiceContact" type="ows:ResponsiblePartySubsetType">
* <annotation>
* <documentation>Information for contacting the service provider. The
* OnlineResource element within this ServiceContact element should not be used
* to reference a web site of the service provider. </documentation>
* </annotation>
* </element>
* </sequence>
*</complexType>
* </pre>
* </p>
*
*/
void serviceProvider() {
start("ows:ServiceProvider");
element("ows:ProviderName", null);
element("ows:ProviderSite", null);
element("ows:ServiceContact", null);
end("ows:ServiceProvider");
}
/**
* Encodes the ows:OperationsMetadata element.
* <p>
* <pre>
* <complexType>
* <sequence>
* <element ref="ows:Operation" minOccurs="2" maxOccurs="unbounded">
* <annotation>
* <documentation>Metadata for unordered list of all the (requests for) operations
* that this server interface implements. The list of required and optional
* operations implemented shall be specified in the Implementation Specification
* for this service. </documentation>
* </annotation>
* </element>
* <element name="Parameter" type="ows:DomainType" minOccurs="0" maxOccurs="unbounded">
* <annotation>
* <documentation>Optional unordered list of parameter valid domains that each
* apply to one or more operations which this server interface implements. The
* list of required and optional parameter domain limitations shall be specified
* in the Implementation Specification for this service. </documentation>
* </annotation>
* </element>
* <element name="Constraint" type="ows:DomainType" minOccurs="0" maxOccurs="unbounded">
* <annotation>
* <documentation>Optional unordered list of valid domain constraints on
* non-parameter quantities that each apply to this server. The list of
* required and optional constraints shall be specified in the Implementation
* Specification for this service. </documentation>
* </annotation>
* </element>
* <element ref="ows:ExtendedCapabilities" minOccurs="0"/>
* </sequence>
*</complexType>
* </pre>
* </p>
*
*/
void operationsMetadata() {
start("ows:OperationsMetadata");
getCapabilities();
describeFeatureType();
getFeature();
if (wfs.getServiceLevel() == WFS.COMPLETE) {
lockFeature();
getFeatureWithLock();
}
if (wfs.getServiceLevel() >= WFS.TRANSACTIONAL) {
transaction();
}
end("ows:OperationsMetadata");
}
/**
* Encodes the GetCapabilities ows:Operation element.
*
*/
void getCapabilities() {
Map.Entry[] parameters = new Map.Entry[] {
parameter("AcceptVersions", new String[] { "1.0.0", "1.1.0" }),
parameter("AcceptFormats", new String[] { "text/xml" })
// parameter(
// "Sections",
// new String[]{
// "ServiceIdentification", "ServiceProvider", "OperationsMetadata",
// "FeatureTypeList", "ServesGMLObjectTypeList", "SupportsGMLObjectTypeList",
// "Filter_Capabilities"
// }
// )
};
operation("GetCapabilities", parameters, true, true);
}
/**
* Encodes the DescribeFeatureType ows:Operation element.
*/
void describeFeatureType() {
//TODO: process extension point
Map.Entry[] parameters = new Map.Entry[] {
parameter("outputFormat", new String[] { "text/gml; subtype=gml/3.1.1" })
};
operation("DescribeFeatureType", parameters, true, true);
}
/**
* Encodes the GetFeature ows:Operation element.
*/
void getFeature() {
Map.Entry[] parameters = new Map.Entry[] {
parameter("resultType", new String[] { "results", "hits" }),
parameter("outputFormat", new String[] { "text/gml; subtype=gml/3.1.1" })
};
operation("GetFeature", parameters, true, true);
}
/**
* Encodes the GetFeatureWithLock ows:Operation element.
*/
void getFeatureWithLock() {
Map.Entry[] parameters = new Map.Entry[] {
parameter("resultType", new String[] { "results", "hits" }),
parameter("outputFormat", new String[] { "text/gml; subtype=gml/3.1.1" })
};
operation("GetFeatureWithLock", parameters, true, true);
}
/**
* Encodes the LockFeature ows:Operation element.
*/
void lockFeature() {
Map.Entry[] parameters = new Map.Entry[] {
parameter("releaseAction", new String[] { "ALL", "SOME" })
};
operation("LockFeature", parameters, true, true);
}
/**
* Encodes the Transaction ows:Operation element.
*/
void transaction() {
Map.Entry[] parameters = new Map.Entry[] {
parameter("inputFormat", new String[] { "text/gml; subtype=gml/3.1.1" }),
parameter("idgen",
new String[] { "GenerateNew", "UseExisting", "ReplaceDuplicate" }),
parameter("releaseAction", new String[] { "ALL", "SOME" })
};
operation("Transaction", parameters, true, true);
}
/**
* Encdoes the wfs:FeatureTypeList element.
*<p>
*<pre>
* <xsd:complexType name="FeatureTypeListType">
* <xsd:annotation>
* <xsd:documentation>
* A list of feature types available from this server.
* </xsd:documentation>
* </xsd:annotation>
* <xsd:sequence>
* <xsd:element name="Operations"
* type="wfs:OperationsType"
* minOccurs="0"/>
* <xsd:element name="FeatureType"
* type="wfs:FeatureTypeType"
* maxOccurs="unbounded"/>
* </xsd:sequence>
* </xsd:complexType>
*</pre>
*</p>
*/
void featureTypeList() {
start("FeatureTypeList");
start("Operations");
if ((wfs.getServiceLevel() | WFS.SERVICE_BASIC) != 0) {
element("Operation", "Query");
}
if ((wfs.getServiceLevel() | WFS.SERVICE_INSERT) != 0) {
element("Operation", "Insert");
}
if ((wfs.getServiceLevel() | WFS.SERVICE_UPDATE) != 0) {
element("Operation", "Update");
}
if ((wfs.getServiceLevel() | WFS.SERVICE_DELETE) != 0) {
element("Operation", "Delete");
}
if ((wfs.getServiceLevel() | WFS.SERVICE_LOCKING) != 0) {
element("Operation", "Lock");
}
end("Operations");
List featureTypes = new ArrayList(catalog.getFeatureTypeInfos().values());
Collections.sort(featureTypes, new FeatureTypeInfoTitleComparator());
for (Iterator i = featureTypes.iterator(); i.hasNext();) {
FeatureTypeInfo featureType = (FeatureTypeInfo) i.next();
featureType(featureType);
}
end("FeatureTypeList");
}
/**
* Encodes the wfs:FeatureType element.
* <p>
* <pre>
* <xsd:complexType name="FeatureTypeType">
* <xsd:annotation>
* <xsd:documentation>
* An element of this type that describes a feature in an application
* namespace shall have an xml xmlns specifier, e.g.
* xmlns:bo="http://www.BlueOx.org/BlueOx"
* </xsd:documentation>
* </xsd:annotation>
* <xsd:sequence>
* <xsd:element name="Name" type="xsd:QName">
* <xsd:annotation>
* <xsd:documentation>
* Name of this feature type, including any namespace prefix
* </xsd:documentation>
* </xsd:annotation>
* </xsd:element>
* <xsd:element name="Title" type="xsd:string">
* <xsd:annotation>
* <xsd:documentation>
* Title of this feature type, normally used for display
* to a human.
* </xsd:documentation>
* </xsd:annotation>
* </xsd:element>
* <xsd:element name="Abstract" type="xsd:string" minOccurs="0">* <xsd:annotation>
* <xsd:documentation>
* Brief narrative description of this feature type, normally* used for display to a human.
* </xsd:documentation>
* </xsd:annotation>
* </xsd:element>
* <xsd:element ref="ows:Keywords" minOccurs="0" maxOccurs="unbounded"/>
* <xsd:choice>
* <xsd:sequence>
* <xsd:element name="DefaultSRS"
* type="xsd:anyURI">
* <xsd:annotation>
* <xsd:documentation>
* The DefaultSRS element indicated which spatial
* reference system shall be used by a WFS to
* express the state of a spatial feature if not
* otherwise explicitly identified within a query
* or transaction request. The SRS may be indicated
* using either the EPSG form (EPSG:posc code) or
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -