- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.n52.svalbard.util.XmlHelper.makeGmlIdsUnique()
方法的一些代码示例,展示了XmlHelper.makeGmlIdsUnique()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlHelper.makeGmlIdsUnique()
方法的具体详情如下:
包路径:org.n52.svalbard.util.XmlHelper
类名称:XmlHelper
方法名:makeGmlIdsUnique
[英]Recurse through a node and its children and make all gml:ids unique
[中]递归一个节点及其子节点,并使所有gml:id唯一
代码示例来源:origin: org.n52.svalbard/svalbard
/**
* Recurse through a node and its children and make all gml:ids unique
*
* @param node
* The root node
*/
public static void makeGmlIdsUnique(final Node node) {
makeGmlIdsUnique(node, new HashMap<>());
}
代码示例来源:origin: org.n52.arctic-sea/svalbard
/**
* Recurse through a node and its children and make all gml:ids unique
*
* @param node
* The root node
*/
public static void makeGmlIdsUnique(final Node node) {
makeGmlIdsUnique(node, new HashMap<>());
}
代码示例来源:origin: org.n52.arctic-sea/svalbard
if (children != null) {
for (int i = 0, len = children.getLength(); i < len; i++) {
makeGmlIdsUnique(children.item(i), foundIds);
代码示例来源:origin: org.n52.svalbard/svalbard
if (children != null) {
for (int i = 0, len = children.getLength(); i < len; i++) {
makeGmlIdsUnique(children.item(i), foundIds);
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
@Override
public XmlObject encode(final Object response, final EncodingContext additionalValues) throws EncodingException {
XmlObject encodedObject = null;
if (response instanceof AbstractSensorML) {
encodedObject = createSensorDescription((AbstractSensorML) response);
// }
// FIXME workaround? if of type UnknowProcedureType try to parse the
// description string, UNIT is missing "NOT_DEFINED"?!
// else if (response instanceof SosProcedureDescriptionUnknownType)
// {
// final String procDescXMLString = ((SosProcedureDescription)
// response).getXml();
// final AbstractSensorML sensorDesc = new AbstractSensorML();
// sensorDesc.setXml(procDescXMLString);
// encodedObject = createSensorDescriptionFromString(sensorDesc);
} else {
throw new UnsupportedEncoderInputException(this, response);
}
// check if all gml:id are unique
XmlHelper.makeGmlIdsUnique(encodedObject.getDomNode());
XmlHelper.validateDocument(encodedObject, EncodingException::new);
return encodedObject;
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
@Override
protected XmlObject create(GetFeatureOfInterestResponse response) throws EncodingException {
GetFeatureOfInterestResponseDocument document =
GetFeatureOfInterestResponseDocument.Factory.newInstance(getXmlOptions());
GetFeatureOfInterestResponseType xbGetFoiResponse = document.addNewGetFeatureOfInterestResponse();
AbstractFeature feature = response.getAbstractFeature();
if (feature instanceof FeatureCollection) {
for (AbstractFeature f : (FeatureCollection) feature) {
addFeatureOfInterest(f, xbGetFoiResponse);
}
} else if (feature instanceof SamplingFeature) {
addFeatureOfInterest(feature, xbGetFoiResponse);
}
XmlHelper.makeGmlIdsUnique(document.getDomNode());
return document;
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
@Override
protected XmlObject createResponse(ObservationEncoder<XmlObject, OmObservation> encoder,
GetObservationByIdResponse response) throws EncodingException {
GetObservationByIdResponseDocument doc =
GetObservationByIdResponseDocument.Factory.newInstance(getXmlOptions());
GetObservationByIdResponseType xbResponse = doc.addNewGetObservationByIdResponse();
ObservationStream observations = getObservationsAndCheckForStreaming(response, encoder);
HashMap<CodeWithAuthority, String> gmlID4sfIdentifier = new HashMap<>();
try {
while (observations.hasNext()) {
OmObservation observation = observations.next();
EncodingContext codingContext = EncodingContext.empty();
CodeWithAuthority foiId = observation.getObservationConstellation().getFeatureOfInterest()
.getIdentifierCodeWithAuthority();
if (gmlID4sfIdentifier.containsKey(foiId)) {
codingContext = codingContext.with(XmlBeansEncodingFlags.EXIST_FOI_IN_DOC, true);
} else {
gmlID4sfIdentifier.put(foiId, GML_ID);
codingContext = codingContext.with(XmlBeansEncodingFlags.EXIST_FOI_IN_DOC, false);
}
codingContext = codingContext.with(XmlBeansEncodingFlags.GMLID, gmlID4sfIdentifier.get(foiId));
xbResponse.addNewObservation().addNewOMObservation().set(encoder.encode(observation, codingContext));
}
} catch (OwsExceptionReport ex) {
throw new EncodingException(ex);
}
XmlHelper.makeGmlIdsUnique(xbResponse.getDomNode());
return doc;
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
@Override
public XmlObject encode(Object objectToEncode, EncodingContext additionalValues) throws EncodingException {
XmlObject encodedObject = null;
try {
if (objectToEncode instanceof AbstractSensorML) {
AbstractSensorML description = (AbstractSensorML) objectToEncode;
if (description.isSetXml()) {
encodedObject = XmlObject.Factory.parse(((AbstractSensorML) objectToEncode).getXml());
addValuesToXmlObject(encodedObject, (AbstractSensorML) objectToEncode);
encodedObject = checkForAdditionalValues(encodedObject, additionalValues);
} else {
encodedObject = encodeDescription(description, additionalValues);
}
} else {
throw new UnsupportedEncoderInputException(this, objectToEncode);
}
} catch (XmlException xmle) {
throw new EncodingException(xmle);
}
// check if all gml:id are unique
XmlHelper.makeGmlIdsUnique(encodedObject.getDomNode());
XmlHelper.validateDocument(encodedObject, EncodingException::new);
return encodedObject;
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
xbObservation.setHref(GmlConstants.NIL_INAPPLICABLE);
XmlHelper.makeGmlIdsUnique(xbObservationCollectionDoc.getDomNode());
N52XmlHelper.setSchemaLocationsToDocument(xbObservationCollectionDoc,
Sets.newHashSet(N52XmlHelper.getSchemaLocationForSOS100(), N52XmlHelper.getSchemaLocationForOM100(),
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
@Override
protected XmlObject createResponse(ObservationEncoder<XmlObject, OmObservation> encoder,
GetObservationResponse response) throws EncodingException {
try {
GetObservationResponseDocument doc = GetObservationResponseDocument.Factory.newInstance(getXmlOptions());
GetObservationResponseType xbResponse = doc.addNewGetObservationResponse();
ObservationStream observationCollection = response.getObservationCollection();
while (observationCollection.hasNext()) {
xbResponse.addNewObservationData()
.addNewOMObservation()
.set(encoder.encode(observationCollection.next()));
}
// in a single observation the gml:ids must be unique
XmlHelper.makeGmlIdsUnique(doc.getDomNode());
return doc;
} catch (OwsExceptionReport ex) {
throw new EncodingException(ex);
}
}
代码示例来源:origin: org.n52.svalbard/svalbard-xmlbeans
@Override
protected XmlObject create(DescribeSensorResponse response)
throws EncodingException {
DescribeSensorResponseDocument doc = DescribeSensorResponseDocument.Factory.newInstance(getXmlOptions());
DescribeSensorResponseType dsr = doc.addNewDescribeSensorResponse();
dsr.setProcedureDescriptionFormat(response.getOutputFormat());
for (SosProcedureDescription<?> sosProcedureDescription : response.getProcedureDescriptions()) {
SensorDescriptionType sensorDescription = dsr.addNewDescription().addNewSensorDescription();
sensorDescription.addNewData().set(getSensorDescription(response, sosProcedureDescription));
if (sosProcedureDescription.isSetValidTime()) {
XmlObject xoValidTime =
encodeObjectToXml(GmlConstants.NS_GML_32, sosProcedureDescription.getValidTime());
XmlObject substitution = sensorDescription.addNewValidTime().addNewAbstractTimeGeometricPrimitive()
.substitute(GmlHelper.getGml321QnameForITime(sosProcedureDescription.getValidTime()),
xoValidTime.schemaType());
substitution.set(xoValidTime);
}
}
// in a single observation the gml:ids must be unique
if (response.getProcedureDescriptions().size() > 1) {
XmlHelper.makeGmlIdsUnique(doc.getDomNode());
}
return doc;
}
下午写了一个操作 XML 文件的类库,后来不用了, 水篇 文章存个档📋 整体功能 XMLHelper.cs 主要提供以下功能: 加载XML文件:从文件
本文整理了Java中com.helger.xml.XMLHelper.getOwnerDocument()方法的一些代码示例,展示了XMLHelper.getOwnerDocument()的具体用法。
本文整理了Java中com.helger.xml.XMLHelper.getPathToNode2()方法的一些代码示例,展示了XMLHelper.getPathToNode2()的具体用法。这些代码
本文整理了Java中com.helger.xml.XMLHelper.filterElementWithNamespaceAndLocalName()方法的一些代码示例,展示了XMLHelper.fi
本文整理了Java中com.helger.xml.XMLHelper.getChildElementIterator()方法的一些代码示例,展示了XMLHelper.getChildElementIt
本文整理了Java中com.helger.xml.XMLHelper.forAllAttributes()方法的一些代码示例,展示了XMLHelper.forAllAttributes()的具体用法。
本文整理了Java中com.helger.xml.XMLHelper.getFirstChildElementOfName()方法的一些代码示例,展示了XMLHelper.getFirstChildE
本文整理了Java中org.n52.svalbard.util.XmlHelper.getNamespace()方法的一些代码示例,展示了XmlHelper.getNamespace()的具体用法。这
本文整理了Java中org.n52.svalbard.util.XmlHelper.makeGmlIdsUnique()方法的一些代码示例,展示了XmlHelper.makeGmlIdsUnique(
本文整理了Java中org.n52.svalbard.util.XmlHelper.validateDocument()方法的一些代码示例,展示了XmlHelper.validateDocument(
本文整理了Java中org.n52.svalbard.util.XmlHelper.getPrefixForNamespace()方法的一些代码示例,展示了XmlHelper.getPrefixFor
本文整理了Java中org.n52.svalbard.util.XmlHelper.isNotNullAndEqualsNSs()方法的一些代码示例,展示了XmlHelper.isNotNullAnd
本文整理了Java中org.n52.svalbard.util.XmlHelper.parseXmlString()方法的一些代码示例,展示了XmlHelper.parseXmlString()的具体
本文整理了Java中org.n52.svalbard.util.XmlHelper.getGmlNSs()方法的一些代码示例,展示了XmlHelper.getGmlNSs()的具体用法。这些代码示例主
本文整理了Java中org.n52.svalbard.util.XmlHelper.checkAttributeForGmlId()方法的一些代码示例,展示了XmlHelper.checkAttrib
本文整理了Java中org.n52.svalbard.util.XmlHelper.updateGmlIDs()方法的一些代码示例,展示了XmlHelper.updateGmlIDs()的具体用法。这
本文整理了Java中org.n52.svalbard.util.XmlHelper.substituteElement()方法的一些代码示例,展示了XmlHelper.substituteElemen
本文整理了Java中org.finra.herd.dao.helper.XmlHelper.objectToXml()方法的一些代码示例,展示了XmlHelper.objectToXml()的具体用法
本文整理了Java中org.finra.herd.dao.helper.XmlHelper.unmarshallXmlToObject()方法的一些代码示例,展示了XmlHelper.unmarsha
试图调用方法 org.hibernate.internal.util.xml.XMLHelper.(Lorg/hibernate/boot/registry/classloading/spi/Clas
我是一名优秀的程序员,十分优秀!