本文整理了Java中org.eclipse.xsd.XSDParticle.getContent()
方法的一些代码示例,展示了XSDParticle.getContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDParticle.getContent()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDParticle
类名称:XSDParticle
方法名:getContent
[英]Returns the value of the 'Content' containment reference.
This concrete reference represents the org.eclipse.xsd.XSDParticleContent of the particle. It is used to compute the #getTerm.
[中]返回“Content”包含引用的值。
这个具体的参考代表组织。日食xsd。XSDParticle粒子的内容。它用于计算#getTerm。
代码示例来源:origin: geotools/geotools
/**
* Returns a list of all child element declarations of the specified type, no order is
* guaranteed.
*
* <p>The <code>includeParents</code> flag controls if this method should returns those elements
* defined on parent types.
*
* @param type The type
* @param includeParents flag indicating if parent types should be processed
* @return A list of @link XSDElementDeclaration objects, one for each child element.
*/
public static final List getChildElementDeclarations(
XSDTypeDefinition type, boolean includeParents) {
List particles = getChildElementParticles(type, includeParents);
List elements = new ArrayList();
for (Iterator p = particles.iterator(); p.hasNext(); ) {
XSDParticle particle = (XSDParticle) p.next();
XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent();
if (decl.isElementDeclarationReference()) {
decl = decl.getResolvedElementDeclaration();
}
elements.add(decl);
}
return elements;
}
代码示例来源:origin: geotools/geotools
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent();
particle = (XSDParticle) matches.get(0);
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent();
代码示例来源:origin: geotools/geotools
/**
* Returns the particle for an element declaration that is part of a type.
*
* @param type The type definition.
* @param name The naem of the child element declaration.
* @param includeParents Flag to control wether parent types are included.
* @return The particle representing the element declaration, or <code>null</code> if it could
* not be found.
*/
public static final XSDParticle getChildElementParticle(
XSDTypeDefinition type, String name, boolean includeParents) {
List particles = getChildElementParticles(type, includeParents);
for (Iterator p = particles.iterator(); p.hasNext(); ) {
XSDParticle particle = (XSDParticle) p.next();
XSDElementDeclaration element = (XSDElementDeclaration) particle.getContent();
if (element.isElementDeclarationReference()) {
element.getResolvedElementDeclaration();
}
if (name.equals(element.getName())) {
return particle;
}
}
return null;
}
代码示例来源:origin: geotools/geotools
/** Returns the name of the element represented by the particle as a QName. */
public static QName getParticleName(XSDParticle particle) {
XSDElementDeclaration content = (XSDElementDeclaration) particle.getContent();
if (content.isElementDeclarationReference()) {
content = content.getResolvedElementDeclaration();
}
return new QName(content.getTargetNamespace(), content.getName());
}
代码示例来源:origin: geotools/geotools
Object[] prop = (Object[]) itr.next();
XSDParticle part = (XSDParticle) prop[0];
XSDElementDeclaration partContent = (XSDElementDeclaration) part.getContent();
if (partContent.getResolvedElementDeclaration() != null) {
partContent = partContent.getResolvedElementDeclaration();
for (int i = 0; i < children.size(); i++) {
XSDParticle particle = (XSDParticle) children.get(i);
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent();
if (child.getResolvedElementDeclaration() != null) {
child = child.getResolvedElementDeclaration();
代码示例来源:origin: geotools/geotools
public void visit(XSDParticle particle) {
XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent();
if (decl.isElementDeclarationReference()) {
decl = decl.getResolvedElementDeclaration();
}
if (decl == fElement) {
if (particle.isSetMaxOccurs()) {
maxOccurs.add(Integer.valueOf(particle.getMaxOccurs()));
} else if (particle.getContainer() instanceof XSDModelGroup
&& particle.getContainer().getContainer()
instanceof XSDParticle) {
particle = (XSDParticle) particle.getContainer().getContainer();
maxOccurs.add(Integer.valueOf(particle.getMaxOccurs()));
} else {
maxOccurs.add(1);
}
}
}
};
代码示例来源:origin: geotools/geotools
public void visit(XSDParticle particle) {
XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent();
if (decl.isElementDeclarationReference()) {
decl = decl.getResolvedElementDeclaration();
}
if (decl == fElement) {
if (particle.isSetMinOccurs()) {
minOccurs.add(Integer.valueOf(particle.getMinOccurs()));
} else if (particle.getContainer() instanceof XSDModelGroup
&& particle.getContainer().getContainer()
instanceof XSDParticle) {
particle = (XSDParticle) particle.getContainer().getContainer();
minOccurs.add(Integer.valueOf(particle.getMinOccurs()));
} else {
minOccurs.add(1);
}
}
}
};
代码示例来源:origin: geotools/geotools
case XSDConstants.GROUP_ELEMENT:
XSDModelGroupDefinition grpDef =
(XSDModelGroupDefinition) particle.getContent();
case XSDConstants.ALL_ELEMENT:
case XSDConstants.SEQUENCE_ELEMENT:
grp = (XSDModelGroup) particle.getContent();
代码示例来源:origin: geotools/geotools
case XSDConstants.GROUP_ELEMENT:
XSDModelGroupDefinition grpDef =
(XSDModelGroupDefinition) particle.getContent();
case XSDConstants.ALL_ELEMENT:
case XSDConstants.SEQUENCE_ELEMENT:
grp = (XSDModelGroup) particle.getContent();
代码示例来源:origin: geotools/geotools
@Override
public Object apply(Object particle) {
XSDElementDeclaration attr =
(XSDElementDeclaration)
((XSDParticle)
particle)
.getContent();
if (attr
.isElementDeclarationReference()) {
attr =
attr
.getResolvedElementDeclaration();
}
return new NameImpl(
attr.getTargetNamespace(),
attr.getName());
}
})
代码示例来源:origin: geotools/geotools
for ( Iterator p = particles.iterator(); p.hasNext(); ) {
XSDParticle particle = (XSDParticle) p.next();
XSDElementDeclaration element = (XSDElementDeclaration) particle.getContent();
代码示例来源:origin: geotools/geotools
XSDElementDeclaration attribute = (XSDElementDeclaration) particle.getContent();
代码示例来源:origin: geotools/geotools
for (Iterator itr = children.iterator(); itr.hasNext(); ) {
XSDParticle particle = (XSDParticle) itr.next();
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent();
p.hasNext(); ) {
XSDParticle particle = (XSDParticle) p.next();
XSDElementDeclaration el = (XSDElementDeclaration) particle.getContent();
if (el.isElementDeclarationReference()) {
el = el.getResolvedElementDeclaration();
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent();
if (child.getResolvedElementDeclaration() != null) {
child = child.getResolvedElementDeclaration();
Object[] prop = (Object[]) itr.next();
XSDParticle part = (XSDParticle) prop[0];
XSDElementDeclaration partContent = (XSDElementDeclaration) part.getContent();
if (partContent.getResolvedElementDeclaration() != null) {
partContent = partContent.getResolvedElementDeclaration();
代码示例来源:origin: geotools/geotools
i.hasNext(); ) {
XSDParticle particle = (XSDParticle) i.next();
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent();
代码示例来源:origin: geotools/geotools
Object[] o = (Object[]) p.next();
XSDParticle particle = (XSDParticle) o[0];
XSDElementDeclaration content = (XSDElementDeclaration) particle.getContent();
if (content.isElementDeclarationReference()) {
content = content.getResolvedElementDeclaration();
代码示例来源:origin: geotools/geotools
(List<XSDParticle>)
Schemas.getChildElementParticles(element.getTypeDefinition(), true)) {
XSDElementDeclaration childElement = (XSDElementDeclaration) childParticle.getContent();
if (childElement.isElementDeclarationReference()) {
childElement = childElement.getResolvedElementDeclaration();
代码示例来源:origin: geotools/geotools
XSDElementDeclaration property = (XSDElementDeclaration) particle.getContent();
代码示例来源:origin: geotools/geotools
for (Iterator itr = children.iterator(); itr.hasNext();) {
XSDParticle particle = (XSDParticle) itr.next();
XSDElementDeclaration element = (XSDElementDeclaration) particle.getContent();
if (element.isElementDeclarationReference()) {
element = element.getResolvedElementDeclaration();
代码示例来源:origin: geotools/geotools
(XSDElementDeclaration) particle.getContent();
代码示例来源:origin: geotools/geotools
.getChildElementParticles(xsdType, false)) {
XSDElementDeclaration element = (XSDElementDeclaration) particle
.getContent();
if (element.isElementDeclarationReference()) {
element = element.getResolvedElementDeclaration();
内容来源于网络,如有侵权,请联系作者删除!