本文整理了Java中org.w3c.dom.Element.setUserData()
方法的一些代码示例,展示了Element.setUserData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setUserData()
方法的具体详情如下:
包路径:org.w3c.dom.Element
类名称:Element
方法名:setUserData
暂无
代码示例来源:origin: marytts/marytts
if (t == null) {
t = new Target(phone, sOrB);
sOrB.setUserData("target", t, Target.targetFeatureCloner);
代码示例来源:origin: marytts/marytts
/**
* For a list of <code>PHONE</code> elements, return a list of Targets, where each Target is constructed from the
* corresponding Element.
*
* @param elements
* List of Elements
* @return List of Targets
*/
protected List<Target> getTargets(List<Element> elements) {
List<Target> targets = new ArrayList<Target>(elements.size());
for (Element element : elements) {
assert element.getTagName() == MaryXML.PHONE;
String phone = UnitSelector.getPhoneSymbol(element);
Target target = new Target(phone, element);
targets.add(target);
// compute FeatureVectors for Targets:
FeatureVector targetFeatureVector = featureComputer.computeFeatureVector(target);
target.setFeatureVector(targetFeatureVector); // this is critical!
element.setUserData("target", target, Target.targetFeatureCloner);
}
return targets;
}
代码示例来源:origin: marytts/marytts
if (t == null) {
t = new Target(phone, sOrB);
sOrB.setUserData("target", t, Target.targetFeatureCloner);
代码示例来源:origin: marytts/marytts
/**
* For a list of <code>PHONE</code> elements, return a list of Targets, where each Target is constructed from the
* corresponding Element.
*
* @param elements
* List of Elements
* @return List of Targets
*/
protected List<Target> getTargets(List<Element> elements) {
List<Target> targets = new ArrayList<Target>(elements.size());
for (Element element : elements) {
assert element.getTagName() == MaryXML.PHONE;
String phone = UnitSelector.getPhoneSymbol(element);
Target target = new Target(phone, element);
targets.add(target);
// compute FeatureVectors for Targets:
FeatureVector targetFeatureVector = featureComputer.computeFeatureVector(target);
target.setFeatureVector(targetFeatureVector); // this is critical!
element.setUserData("target", target, Target.targetFeatureCloner);
}
return targets;
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void setModelElementInstance(ModelElementInstance modelElementInstance) {
synchronized(document) {
element.setUserData(MODEL_ELEMENT_KEY, modelElementInstance, null);
}
}
代码示例来源:origin: jamesagnew/hapi-fhir
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
// Mutation event fired by the adding of element end,
// and so lastAddedElement will be set.
super.endElement(uri, localName, qName);
if (locatorStack.size() > 0) {
Locator startLocator = locatorStack.pop();
XmlLocationData location = new XmlLocationData(
startLocator.getSystemId(),
startLocator.getLineNumber(),
startLocator.getColumnNumber(),
locator.getLineNumber(),
locator.getColumnNumber());
Element lastAddedElement = elementStack.pop();
lastAddedElement.setUserData(
XmlLocationData.LOCATION_DATA_KEY, location,
dataHandler);
}
}
代码示例来源:origin: jamesagnew/hapi-fhir
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
// Mutation event fired by the adding of element end,
// and so lastAddedElement will be set.
super.endElement(uri, localName, qName);
if (locatorStack.size() > 0) {
Locator startLocator = locatorStack.pop();
XmlLocationData location = new XmlLocationData(
startLocator.getSystemId(),
startLocator.getLineNumber(),
startLocator.getColumnNumber(),
locator.getLineNumber(),
locator.getColumnNumber());
Element lastAddedElement = elementStack.pop();
lastAddedElement.setUserData(
XmlLocationData.LOCATION_DATA_KEY, location,
dataHandler);
}
}
代码示例来源:origin: jamesagnew/hapi-fhir
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
// Mutation event fired by the adding of element end,
// and so lastAddedElement will be set.
super.endElement(uri, localName, qName);
if (locatorStack.size() > 0) {
Locator startLocator = locatorStack.pop();
XmlLocationData location = new XmlLocationData(
startLocator.getSystemId(),
startLocator.getLineNumber(),
startLocator.getColumnNumber(),
locator.getLineNumber(),
locator.getColumnNumber());
Element lastAddedElement = elementStack.pop();
lastAddedElement.setUserData(
XmlLocationData.LOCATION_DATA_KEY, location,
dataHandler);
}
}
代码示例来源:origin: OfficeDev/ews-java-api
element.setUserData("location", ele.getLocation(), null);
代码示例来源:origin: org.camunda.bpm.model/camunda-xml-model
public void setModelElementInstance(ModelElementInstance modelElementInstance) {
synchronized(document) {
element.setUserData(MODEL_ELEMENT_KEY, modelElementInstance, null);
}
}
代码示例来源:origin: org.opensingular/form-core
/**
* @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
*/
public Object setUserData(String key, Object data, UserDataHandler handler) {
return getAtualInterno().setUserData(key, data, handler);
}
代码示例来源:origin: org.opensingular/form-core
/**
* @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
*/
@Override
public Object setUserData(String key, Object data, UserDataHandler handler) {
return original.get().setUserData(key, data, handler);
}
代码示例来源:origin: org.opensingular/singular-commons
/**
* @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
*/
@Override
public Object setUserData(String key, Object data, UserDataHandler handler) {
return original.get().setUserData(key, data, handler);
}
代码示例来源:origin: Geomatys/geotoolkit
@Override
public Object setUserData(String key, Object data, UserDataHandler handler) {
final Element elem = getElement();
return elem != null ? elem.setUserData(key, data, handler) : null;
}
代码示例来源:origin: membrane/service-proxy
protected void parseChildren(Element element, ParserContext context,
MutableBeanMetadata mcm, BlueprintParser globalParser) {
element.setUserData(BlueprintNamespaceParser.KEY_PARENT_CLASS_NAME, mcm.getRuntimeClass().getName(), null);
NodeList nl = element.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element) {
handleChildElement((Element) node, context, mcm, globalParser);
}
}
}
代码示例来源:origin: apache/cxf
@Override
protected void createAndAddElement(String prefix, String local, String namespace) {
super.createAndAddElement(prefix, local, namespace);
if (isOverlaid) {
try {
//mark this as new so we don't consider this for overlaying
getCurrentNode().setUserData("new", "new", null);
} catch (Throwable t) {
//ignore
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-core
@Override
protected void createAndAddElement(String prefix, String local, String namespace) {
super.createAndAddElement(prefix, local, namespace);
if (isOverlaid) {
try {
//mark this as new so we don't consider this for overlaying
getCurrentNode().setUserData("new", "new", null);
} catch (Throwable t) {
//ignore
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
@Override
protected void createAndAddElement(String prefix, String local, String namespace) {
super.createAndAddElement(prefix, local, namespace);
if (isOverlaid) {
try {
//mark this as new so we don't consider this for overlaying
getCurrentNode().setUserData("new", "new", null);
} catch (Throwable t) {
//ignore
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-api
@Override
protected void createAndAddElement(String prefix, String local, String namespace) {
super.createAndAddElement(prefix, local, namespace);
if (isOverlaid) {
try {
//mark this as new so we don't consider this for overlaying
getCurrentNode().setUserData("new", "new", null);
} catch (Throwable t) {
//ignore
}
}
}
代码示例来源:origin: org.apache.any23/apache-any23-core
@Override
protected Element createElementNode(QName qName) {
final Element created = super.createElementNode(qName);
if (qName.equals(currentQName) && currentAugmentations != null) {
final ElementLocation elementLocation = createElementLocation(
currentAugmentations.getItem(AUGMENTATIONS_FEATURE)
);
created.setUserData(ELEMENT_LOCATION, elementLocation, null);
}
return created;
}
内容来源于网络,如有侵权,请联系作者删除!