本文整理了Java中org.eclipse.xsd.XSDElementDeclaration.getType()
方法的一些代码示例,展示了XSDElementDeclaration.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDElementDeclaration.getType()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDElementDeclaration
类名称:XSDElementDeclaration
方法名:getType
[英]Returns the value of the 'Type Definition' reference.
This represents the type definition infoset property.
[中]返回“类型定义”引用的值。
这表示type definitioninfoset属性。
代码示例来源:origin: geotools/geotools
boolean isMixed() {
if (!parser.isHandleMixedContent()) {
return false;
}
return content.getType() != null
&& content.getType() instanceof XSDComplexTypeDefinition
&& ((XSDComplexTypeDefinition) content.getType()).isMixed();
}
代码示例来源:origin: geotools/geotools
childElement = childElement.getResolvedElementDeclaration();
if (childElement
.getType()
.getName()
.equals(complex.getType().getName().getLocalPart())) {
代码示例来源:origin: geotools/geotools
/**
* Returns a list of all child element declarations of the specified element, no order is
* guaranteed.
*
* @param element The parent element.
* @return A list of @link XSDElementDeclaration objects, one for each child element.
* @deprecated use {@link #getChildElementDeclarations(XSDTypeDefinition)}
*/
public static final List getChildElementDeclarations(XSDElementDeclaration element) {
return getChildElementDeclarations(element.getType());
}
代码示例来源:origin: geotools/geotools
/**
* Returns a list of all child element declarations of the specified element.
*
* <p>The <code>includeParents</code> flag controls if this method should returns those elements
* defined on parent types.
*
* @param element The parent element.
* @param includeParents Flag indicating if parent types should be processed.
* @return A list of @link XSDElementDeclaration objects, one for each child element.
* @deprecated use {@link #getChildElementDeclarations(XSDTypeDefinition, boolean)}
*/
public static final List getChildElementDeclarations(
XSDElementDeclaration element, boolean includeParents) {
return getChildElementDeclarations(element.getType(), includeParents);
}
代码示例来源:origin: geotools/geotools
/**
* Returns a list of all attribute declarations declared in the type (or any base type) of the
* specified element.
*
* <p>This method is just a shortcut for {@link #getAttributeDeclarations(XSDTypeDefinition)
* getAttributeDeclarations(element.getType()}
*
* @param element The element.
* @return A list of @link XSDAttributeDeclaration objects, one for each attribute of the
* element.
*/
public static final List getAttributeDeclarations(XSDElementDeclaration element) {
return getAttributeDeclarations(element.getType());
}
代码示例来源:origin: geotools/geotools
/**
* Determines if the type of an element is a sub-type of another element.
*
* @param e1 The element.
* @param e2 The element to be tested as a base type.
* @since 2.5
*/
public static final boolean isBaseType(XSDElementDeclaration e1, XSDElementDeclaration e2) {
XSDTypeDefinition type = e1.getType();
while (type != null) {
if (type.equals(e2.getType())) {
return true;
}
if (type.equals(type.getBaseType())) {
break;
}
type = type.getBaseType();
}
return false;
}
/**
代码示例来源:origin: geotools/geotools
/**
* Returns a list of all top level elements that are of a type derived from the type of the
* specified element.
*
* @param element The element.
* @return All elements which are of a type derived from the type of the specified element.
*/
public static final List getDerivedElementDeclarations(XSDElementDeclaration element) {
List elements = element.getSchema().getElementDeclarations();
List derived = new ArrayList();
for (Iterator itr = elements.iterator(); itr.hasNext(); ) {
XSDElementDeclaration derivee = (XSDElementDeclaration) itr.next();
if (derivee.equals(element)) {
continue; // same element
}
XSDTypeDefinition type = derivee.getType();
while (true) {
if (type.equals(element.getType())) {
derived.add(derivee);
break;
}
if (type.equals(type.getBaseType())) {
break;
}
type = type.getBaseType();
}
}
return derived;
}
代码示例来源:origin: geotools/geotools
protected final XSDTypeDefinition findGlobalElementXSDType(XSDElementDeclaration element) {
for (Iterator i = schema.getElementDeclarations().iterator(); i.hasNext();) {
XSDElementDeclaration e = (XSDElementDeclaration) i.next();
if (element.getName().equals( e.getName() ) && (element.getTargetNamespace() == null ||
element.getTargetNamespace().equals( e.getTargetNamespace() ) ) ) {
return e.getType();
}
}
return null;
}
代码示例来源:origin: geotools/geotools
Schemas.getChildElementParticles(parent.getType(), true)
.iterator();
i.hasNext(); ) {
} else if (parent.getTargetNamespace() != null) {
childName = new QName(parent.getTargetNamespace(), child.getName());
} else if (parent.getType().getTargetNamespace() != null) {
childName =
new QName(
parent.getType().getTargetNamespace(), child.getName());
} else {
childName = new QName(null, child.getName());
代码示例来源:origin: geotools/geotools
XSDTypeDefinition type = e.getType();
entry.object,
entry.element,
entry.parent.element.getType())
: (Element) encode(entry.object, entry.element);
代码示例来源:origin: geotools/geotools
element.getType(), name.getLocalPart(), true);
if (particle != null) {
particles.put(name, particle);
Schemas.getChildElementParticles(element.getType(), true)
.iterator();
p.hasNext(); ) {
代码示例来源:origin: geotools/geotools
List children = Schemas.getChildElementParticles(element.getType(), true);
代码示例来源:origin: geotools/geotools
XSDTypeDefinition typeDef = elemDecl.getType();
代码示例来源:origin: geotools/geotools
public void testElement() {
ElementInstance element = element(" hello world ", XS.ANYSIMPLETYPE);
assertEquals(" hello world ", element.getText());
assertEquals(
xsdSimple(XS.ANYSIMPLETYPE.getLocalPart()),
element.getElementDeclaration().getType());
}
代码示例来源:origin: org.geotools/gt2-xml-core
/**
* Returns a list of all child element declarations of the specified
* element, no order is guaranteed.
*
* @param element The parent element.
*
* @return A list of @link XSDElementDeclaration objects, one for each
* child element.
*
* @deprecated use {@link #getChildElementDeclarations(XSDTypeDefinition)}
*/
public static final List getChildElementDeclarations(XSDElementDeclaration element) {
return getChildElementDeclarations(element.getType());
}
代码示例来源:origin: org.geotools.xsd/gt-core
/**
* Returns a list of all child element declarations of the specified
* element, no order is guaranteed.
*
* @param element The parent element.
*
* @return A list of @link XSDElementDeclaration objects, one for each
* child element.
*
* @deprecated use {@link #getChildElementDeclarations(XSDTypeDefinition)}
*/
public static final List getChildElementDeclarations(XSDElementDeclaration element) {
return getChildElementDeclarations(element.getType());
}
代码示例来源:origin: org.geotools/gt2-xml-xsd
/**
* Returns a list of all child element declarations of the specified
* element, no order is guaranteed.
*
* @param element The parent element.
*
* @return A list of @link XSDElementDeclaration objects, one for each
* child element.
*
* @deprecated use {@link #getChildElementDeclarations(XSDTypeDefinition)}
*/
public static final List getChildElementDeclarations(
XSDElementDeclaration element) {
return getChildElementDeclarations(element.getType());
}
代码示例来源:origin: org.geotools/gt2-xml-core
/**
* Returns a list of all attribute declarations declared in the type (or
* any base type) of the specified element.
*
* <p>
* This method is just a shortcut for {@link #getAttributeDeclarations(XSDTypeDefinition) getAttributeDeclarations(element.getType()}
* </p>
*
* @param element The element.
*
* @return A list of @link XSDAttributeDeclaration objects, one for each
* attribute of the element.
*/
public static final List getAttributeDeclarations(XSDElementDeclaration element) {
return getAttributeDeclarations(element.getType());
}
代码示例来源:origin: org.geotools.xsd/gt-core
/**
* Returns a list of all attribute declarations declared in the type (or
* any base type) of the specified element.
*
* <p>
* This method is just a shortcut for {@link #getAttributeDeclarations(XSDTypeDefinition) getAttributeDeclarations(element.getType()}
* </p>
*
* @param element The element.
*
* @return A list of @link XSDAttributeDeclaration objects, one for each
* attribute of the element.
*/
public static final List getAttributeDeclarations(XSDElementDeclaration element) {
return getAttributeDeclarations(element.getType());
}
代码示例来源:origin: org.geotools/gt2-xml-xsd
/**
* Returns a list of all attribute declarations declared in the type (or
* any base type) of the specified element.
*
* <p>
* This method is just a shortcut for {@link #getAttributeDeclarations(XSDTypeDefinition) getAttributeDeclarations(element.getType()}
* </p>
*
* @param element The element.
*
* @return A list of @link XSDAttributeDeclaration objects, one for each
* attribute of the element.
*/
public static final List getAttributeDeclarations(
XSDElementDeclaration element) {
return getAttributeDeclarations(element.getType());
}
内容来源于网络,如有侵权,请联系作者删除!