热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.deegree.commons.xml.XPath.()方法的使用及代码示例

本文整理了Java中org.deegree.commons.xml.XPath.<init>()方法的一些代码示例,展示了XPath.<i

本文整理了Java中org.deegree.commons.xml.XPath.()方法的一些代码示例,展示了XPath.()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPath.()方法的具体详情如下:
包路径:org.deegree.commons.xml.XPath
类名称:XPath
方法名:

XPath.介绍

暂无

代码示例

代码示例来源:origin: deegree/deegree3

private BBoxOutputType parseBBoxOutput( OMElement bboxData, CodeType id, LanguageString outputTitle,
LanguageString outputAbstract ) {
XPath xpath = new XPath( "Default/CRS", nsContext );
String defaultCrs = omResponse.getElement( bboxData, xpath ).getText();
xpath = new XPath( "Supported/CRS", nsContext );
List omSupported = omResponse.getElements( bboxData, xpath );
String[] supportedCrs = new String[omSupported.size()];
for ( int i = 0; i supportedCrs[i] = omSupported.get( i ).getText();
}
return new BBoxOutputType( id, outputTitle, outputAbstract, defaultCrs, supportedCrs );
}

代码示例来源:origin: deegree/deegree3

private BBoxInputType parseBBoxData( OMElement input, CodeType id, LanguageString inputTitle,
LanguageString inputAbstract, String minOccurs, String maxOccurs ) {
XPath xpath = new XPath( "Default/CRS", nsContext );
String defaultCRS = omResponse.getElement( input, xpath ).getText();
xpath = new XPath( "Supported/CRS", nsContext );
List omSupported = omResponse.getElements( input, xpath );
String[] supportedCRSs = new String[omSupported.size()];
for ( int i = 0; i supportedCRSs[i] = omSupported.get( i ).getText();
}
return new BBoxInputType( id, inputTitle, inputAbstract, minOccurs, maxOccurs, defaultCRS, supportedCRSs );
}

代码示例来源:origin: deegree/deegree3

@Override
public List parseFeatureTypeList() {
List ftEls = getElements( rootElement, new XPath( "wfs:FeatureTypeList/wfs:FeatureType", nsContext ) );
List fts = new ArrayList( ftEls.size() );
for ( OMElement ftEl : ftEls ) {
fts.add( parseFeatureType( ftEl ) );
}
return fts;
}

代码示例来源:origin: deegree/deegree3

@Override
public List parseFeatureTypeList() {
List ftEls = getElements( rootElement, new XPath( "wfs:FeatureTypeList/wfs:FeatureType", nsContext ) );
List fts = new ArrayList( ftEls.size() );
for ( OMElement ftEl : ftEls ) {
fts.add( parseFeatureType( ftEl ) );
}
return fts;
}

代码示例来源:origin: deegree/deegree3

private List> parseIdentifiers( OMElement lay ) {
List> identifiers = new ArrayList>();
List identiferElements = getElements( lay, new XPath( getPrefix() + "Identifier", nsContext ) );
for ( OMElement identifierElement : identiferElements ) {
String id = identifierElement.getText();
if ( id != null && id.length() > 0 ) {
String authority = getNodeAsString( identifierElement, new XPath( "@authority" ), null );
identifiers.add( new Pair( id, authority ) );
}
}
return identifiers;
}

代码示例来源:origin: deegree/deegree3

private List> parseAuthorities( OMElement lay ) {
List> authorities = new ArrayList>();
List authorityElements = getElements( lay, new XPath( getPrefix() + "AuthorityURL", nsContext ) );
for ( OMElement authorityElement : authorityElements ) {
String authority = getNodeAsString( authorityElement, new XPath( "@name" ), null );
String authorityUrl = getNodeAsString( authorityElement, new XPath( getPrefix()
+ "OnlineResource/@xlink:href",
nsContext ), null );
authorities.add( new Pair( authority, authorityUrl ) );
}
return authorities;
}

代码示例来源:origin: deegree/deegree3

@Override
public void serialize( XMLStreamWriter writer, String[] elementNames )
throws XMLStreamException {
List xpathEN = new ArrayList();
for ( String s : elementNames ) {
xpathEN.add( new XPath( s, CommonNamespaces.getNamespaceContext() ) );
}
if ( !xpathEN.isEmpty() ) {
writer = new FilteringXMLStreamWriter( writer, xpathEN );
}
root.serialize( writer );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the id
*/
public String getId() {
return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "./@id", ns ) );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the extId
*/
public String getExtId() {
return adapter.getNodeAsString( adapter.getRootElement(),
new XPath( "./rim:ExternalIdentifier/rim:Name/rim:LocalizedString/@value", ns ),
null );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the queryExpression
*/
public OMElement getQueryExpression() {
return adapter.getElement( adapter.getRootElement(), new XPath( "./rim:QueryExpression", ns ) );
}

代码示例来源:origin: deegree/deegree3

private static String retrieveLiteral( OMElement value ) {
XMLAdapter adapter = new XMLAdapter();
XPath xpath = new XPath( "//" + FES_PREFIX + ":Literal", NS_CONTEXT );
return adapter.getNodeAsString( value, xpath, null );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the desc
*/
public String getDesc() {
return adapter.getNodeAsString( adapter.getRootElement(),
new XPath( "./rim:Description/rim:LocalizedString/@value", ns ), null );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the home
*/
public String getHome() {
return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./@home", ns ), null );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the status
*/
public String getStatus() {
return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./@status", ns ), null );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the targetObject
*/
public String getTargetObject() {
return adapter.getRequiredNodeAsString( adapter.getRootElement(), new XPath( "@targetObject", ns ) );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the parent
*/
public String getParent() {
return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./@parent", ns ), null );
}

代码示例来源:origin: deegree/deegree3

/**
* @return the code
*/
public String getCode() {
return adapter.getNodeAsString( adapter.getRootElement(), new XPath( "./@code", ns ), null );
}

代码示例来源:origin: deegree/deegree3

private String parseOutputFormat()
throws OWSException {
String format = getNodeAsString( rootElement, new XPath( "/" + WCS_PREFIX + ":GetCoverage/" + WCS_PREFIX
+ ":output/" + WCS_PREFIX + ":format", wcsNSContext ),
null );
checkRequiredString( "format", format );
return format;
}

代码示例来源:origin: deegree/deegree3

/**
* @return a {@link OWSCapabilities} instance, never null
*/
public OWSCapabilities parseMetadata() {
Version version = getNodeAsVersion( rootElement, new XPath( "@version", nsContext ), null );
String sequence = getNodeAsString( rootElement, new XPath( "@updateSequence", nsContext ), null );
ServiceIdentification serviceId = parseServiceIdentification();
ServiceProvider serviceProvider = parseServiceProvider();
OperationsMetadata opMetadata = parseOperationsMetadata();
List languages = parseLanguages();
return new OWSCapabilities( version, sequence, serviceId, serviceProvider, opMetadata, languages );
}

代码示例来源:origin: deegree/deegree3

private QName determineTargetElementAdv( XMLAdapter annotationXML ) {
NamespaceBindings nsCOntext= new NamespaceBindings();
nsContext.addNamespace( "xs", CommonNamespaces.XSNS );
nsContext.addNamespace( "adv", "http://www.adv-online.de/nas" );
QName refElement = annotationXML.getNodeAsQName( annotationXML.getRootElement(),
new XPath( "xs:appinfo/adv:referenziertesElement/text()",
nsContext ), null );
if ( refElement != null ) {
LOG.trace( "Identified a target element annotation (adv style)." );
}
return refElement;
}

推荐阅读
author-avatar
公民不是百姓2
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有