gpt4 book ai didi

org.n52.security.common.xml.XMLPathCtx.addNamespace()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 05:07:05 29 4
gpt4 key购买 nike

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

XMLPathCtx.addNamespace介绍

[英]Method adds prefix to namespace mapping, so the prefix can be used to qualify xpath expressions.
[中]方法将前缀添加到命名空间映射中,因此前缀可用于限定xpath表达式。

代码示例

代码示例来源:origin: org.n52.security/52n-security-decision-xacml

XACML2ResponseChunkHandler(List<ResponseDocument> responseSet) {
  m_responseSet = responseSet;
  xmlPathCtx = XMLPathCtx.createNew();
  xmlPathCtx.addNamespace("c", "urn:oasis:names:tc:xacml:2.0:context:schema:os").addNamespace("p",
      "urn:oasis:names:tc:xacml:2.0:policy:schema:os");
}

代码示例来源:origin: org.n52.security/52n-security-wss

private WSSCapabilitiesDocument(Document capsDoc) {
  m_capsDoc = capsDoc;
  m_xPathCtx = XMLPathCtx.createNew();
  m_xPathCtx.addNamespace("authn", "http://www.gdi-nrw.org/authn");
  m_xPathCtx.addNamespace("xlink", "http://www.w3.org/1999/xlink");
  m_xPathCtx.addNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
  m_xPathCtx.addNamespace("licb", "http://www.conterra.de/licb");
  m_xPathCtx.addNamespace("ows", "http://www.opengis.net/ows");
  m_xPathCtx.addNamespace("wss", "http://www.gdi-nrw.org/wss");
  m_editor = new Editor();
  m_parser = new Parser();
}

代码示例来源:origin: org.n52.security/52n-security-facade

public PAOSResponse(Element paosResponse) {
  m_paosResponse = paosResponse;
  setXpathCtx(XMLPathCtx.createNew().addNamespace("samlp", "urn:oasis:names:tc:SAML:2.0:protocol").addNamespace(
      "ecp", "urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp"));
}

代码示例来源:origin: org.n52.metadata/smarteditor-api

/**
 * Class constructor.
 * <p/>
 * <p>
 * Within this initialization, the classloader searches the xml configuration file <br>
 * called 'catalog_api_factory.xml' that needs to be in the classpath. If not, the <br>
 * initialization of the factory fails.
 * </p>
 */
public BuilderFactory() {
  InputStream is = BuilderFactory.class.getResourceAsStream("/catalog_api_factory.xml");
  if (is != null) {
    mRoot = DOMUtil.createFromStream(is, null);
    xmlPathCtx = XMLPathCtx.createNew();
    xmlPathCtx.addNamespace("api", "http://www.conterra.de/catalog/config/catapi");
  } else {
    LOG.error("Could not find 'catalog_api_factory.xml' in CLASSPATH. BuilderFactory is not available");
    mRoot = null;
  }
}

代码示例来源:origin: org.n52.security/52n-security-facade

public List<SAML2IdPMetadata> getIdPMetadata() {
  XMLPathCtx xpathCtx = XMLPathCtx.createNew().addNamespace("md", "urn:oasis:names:tc:SAML:2.0:metadata");
  NodeList idpList = xpathCtx.findIn(m_federationMetadata).all("//md:IDPSSODescriptor").get();
  List<SAML2IdPMetadata> mdList = new ArrayList<SAML2IdPMetadata>();
  for (int i = 0; i < idpList.getLength(); i++) {
    Element idpSsoDescriptor = (Element) idpList.item(i);
    try {
      SAML2IdPMetadata idPMetadata = SAML2IdPMetadata.createFrom(idpSsoDescriptor);
      mdList.add(idPMetadata);
    } catch (MalformedURLException e) {
      LOG.error("Skipping IDPSSODescriptor element", e);
    }
  }
  return mdList;
}

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1")
    .addNamespace("sos", "http://www.opengis.net/sos/1.0");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1")
    .addNamespace("sos", "http://www.opengis.net/sos/1.0");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1")
    .addNamespace("sos", "http://www.opengis.net/sos/1.0");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1").addNamespace("wfs",
    "http://www.opengis.net/wfs");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

= XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1").addNamespace("wfs",
"http://www.opengis.net/wfs/1.0.0");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1")
    .addNamespace("sos", "http://www.opengis.net/sos/1.0")
    .addNamespace("gml", "http://www.opengis.net/gml");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1").addNamespace("wps",
    "http://www.opengis.net/wps/1.0.0");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

isXMLRequest = true;
ctx
    = XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1").addNamespace("wfs",
    "http://www.opengis.net/wfs/1.0.0").addNamespace("ogc", "http://www.opengis.net/ogc");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("sos", "http://www.opengis.net/sos/1.0")
    .addNamespace("gml", "http://www.opengis.net/gml");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1")
    .addNamespace("sos", "http://www.opengis.net/sos/1.0")
    .addNamespace("gml", "http://www.opengis.net/gml");

代码示例来源:origin: org.n52.security/52n-security-facade

public static SAML2IdPMetadata createFrom(Element idpSsoDescrElement) throws MalformedURLException {
  XMLPathCtx xpathCtx = XMLPathCtx.createNew().addNamespace("md", "urn:oasis:names:tc:SAML:2.0:metadata");
  NodeList nodeList = xpathCtx.findIn(idpSsoDescrElement).all("md:SingleSignOnService").get();
  SAML2IdPMetadata metadata = new SAML2IdPMetadata();
  for (int i = 0; i < nodeList.getLength(); i++) {
    Element ssoService = (Element) nodeList.item(i);
    String binding = ssoService.getAttribute("Binding");
    String location = ssoService.getAttribute("Location");
    metadata.addSSOBinding(binding, new URL(location));
  }
  Element organizationElem = (Element) xpathCtx.findIn(idpSsoDescrElement).node("./../md:Organization").get();
  if (organizationElem == null) {
    String entityID = xpathCtx.findIn(idpSsoDescrElement).text("./../@entityID").get();
    metadata.setOrganisationDisplayName(entityID);
  } else {
    String idpDisplayName = xpathCtx.findIn(organizationElem).text("md:OrganizationDisplayName/text()").get();
    metadata.setOrganisationDisplayName(idpDisplayName);
  }
  return metadata;
}

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1").addNamespace("wps",
    "http://www.opengis.net/wps/1.0.0");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1")
    .addNamespace("sos", "http://www.opengis.net/sos/1.0")
    .addNamespace("gml", "http://www.opengis.net/gml");

代码示例来源:origin: org.n52.security/52n-security-enforcement-impl

XMLPathCtx.createNew().addNamespace("ows", "http://www.opengis.net/ows/1.1")
    .addNamespace("sos", "http://www.opengis.net/sos/1.0")
    .addNamespace("gml", "http://www.opengis.net/gml");

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com