本文整理了Java中org.eclipse.xsd.XSDElementDeclaration.getTargetNamespace()
方法的一些代码示例,展示了XSDElementDeclaration.getTargetNamespace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDElementDeclaration.getTargetNamespace()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDElementDeclaration
类名称:XSDElementDeclaration
方法名:getTargetNamespace
暂无
代码示例来源: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
public ElementEncodeExecutor(
Object object,
XSDElementDeclaration element,
Document document,
Logger logger,
NamespaceSupport namespaces) {
this.object = object;
this.element = element;
this.document = document;
this.logger = logger;
this.namespaces = namespaces;
// if ( element.getTargetNamespace() != null ) {
encoding = document.createElementNS(element.getTargetNamespace(), element.getName());
// }
// else {
// encoding = document.createElementNS(
// element.getSchema().getTargetNamespace(), element.getName()
// );
// }
}
代码示例来源:origin: geotools/geotools
protected void buildElementIndex() {
elementIndex = new HashMap();
for (int i = 0; i < schemas.length; i++) {
XSDSchema schema = schemas[i];
for (Iterator e = schema.getElementDeclarations().iterator(); e.hasNext(); ) {
XSDElementDeclaration element = (XSDElementDeclaration) e.next();
QName qName = new QName(element.getTargetNamespace(), element.getName());
elementIndex.put(qName, element);
}
}
}
代码示例来源:origin: geotools/geotools
/**
* Searches <code>schema</code> for an element which matches <code>name</code>.
*
* @param schema The schema
* @param name The element to search for
* @return The element declaration, or null if it could not be found.
*/
public static XSDElementDeclaration getElementDeclaration(XSDSchema schema, QName name) {
for (Iterator e = schema.getElementDeclarations().iterator(); e.hasNext(); ) {
XSDElementDeclaration element = (XSDElementDeclaration) e.next();
if (element.getTargetNamespace().equals(name.getNamespaceURI())) {
if (element.getName().equals(name.getLocalPart())) {
return element;
}
}
}
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
&& (child.getTargetNamespace() == null
? partContent.getTargetNamespace() == null
: child.getTargetNamespace()
.equals(partContent.getTargetNamespace()))) {
notFound = false;
break;
代码示例来源:origin: geotools/geotools
XSDElementDeclaration element = (XSDElementDeclaration)itr.next();
if (element.getName() == null) continue;
if (!ns.equals(element.getTargetNamespace())) continue;
代码示例来源:origin: geotools/geotools
if (child.getTargetNamespace() != null) {
childName = new QName(child.getTargetNamespace(), child.getName());
} else if (parent.getTargetNamespace() != null) {
childName = new QName(parent.getTargetNamespace(), child.getName());
} else if (parent.getType().getTargetNamespace() != null) {
childName =
代码示例来源:origin: geotools/geotools
(XSDElementDeclaration) e.getSubstitutionGroup().get(i);
if (se == null
|| (Utilities.equals(el.getTargetNamespace(), se.getTargetNamespace())
&& Utilities.equals(el.getName(), se.getName()))) {
toremove.add(i);
代码示例来源:origin: geotools/geotools
private AttributeDescriptor createAttributeDescriptor(
final XSDElementDeclaration elemDecl,
int minOccurs,
int maxOccurs,
CoordinateReferenceSystem crs) {
String targetNamespace = elemDecl.getTargetNamespace();
String name = elemDecl.getName();
Name elemName = Types.typeName(targetNamespace, name);
AttributeType type = getTypeOf(elemDecl, crs);
boolean nillable = elemDecl.isNillable();
Object defaultValue = null;
AttributeDescriptor descriptor =
createAttributeDescriptor(
type, crs, elemName, minOccurs, maxOccurs, nillable, defaultValue);
descriptor.getUserData().put(XSDElementDeclaration.class, elemDecl);
return descriptor;
}
代码示例来源:origin: geotools/geotools
namespace = element.getTargetNamespace();
if (GML.NAMESPACE.equals(attribute.getTargetNamespace())) {
continue;
代码示例来源: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
String prefix = namespaces.getPrefix(content.getTargetNamespace());
QualifiedName contentName;
if (prefix != null) {
contentName =
QualifiedName.build(
content.getTargetNamespace(), content.getName(), prefix);
} else {
contentName =
new QualifiedName(content.getTargetNamespace(), content.getName());
代码示例来源:origin: geotools/geotools
sub = (XSDElementDeclaration) substitutions.next();
if (!(sub.getName().equals(elemDecl.getName()))
|| !(sub.getTargetNamespace().equals(elemDecl.getTargetNamespace()))) {
Name elemName = Types.typeName(sub.getTargetNamespace(), sub.getName());
AttributeType type = getTypeOf(sub, crs);
if (type != null) {
&& desc.getName()
.getNamespaceURI()
.equals(element.getTargetNamespace())) {
childDesc = desc;
break;
代码示例来源:origin: geotools/geotools
SimpleFeatureTypeBuilder ftBuilder = new SimpleFeatureTypeBuilder();
ftBuilder.setName(element.getName());
ftBuilder.setNamespaceURI(element.getTargetNamespace());
final String propNamespace = property.getTargetNamespace();
if (Geometry.class.isAssignableFrom(theClass)
&& (propNamespace == null || !propNamespace.startsWith(GML.NAMESPACE))) {
代码示例来源:origin: geotools/geotools
String msg =
"Failed to create descriptor for '"
+ childDecl.getTargetNamespace()
+ "#"
+ childDecl.getName()
&& desc.getName()
.getNamespaceURI()
.equals(elemDecl.getTargetNamespace())) {
att = desc;
break;
代码示例来源:origin: geotools/geotools
QName subQName = new QName(sub.getTargetNamespace(), sub.getName());
Handler handler = getChildHandlerInternal(subQName);
代码示例来源:origin: geotools/geotools
Types.typeName(elemDecl.getTargetNamespace(), elemDecl.getName()));
for (SchemaIndex schemaIndex : schemas) {
elemDecl = schemaIndex.getElementDeclaration(qname);
String msg =
"The element declaration "
+ elemDecl.getTargetNamespace()
+ "#"
+ elemDecl.getName()
String targetNamespace = elemDecl.getTargetNamespace();
Name overrideName = Types.typeName(targetNamespace, name);
type = createType(overrideName, typeDefinition, crs, true);
代码示例来源:origin: geotools/geotools
new NameImpl(element.getTargetNamespace(), element.getName()),
minOccurs, maxOccurs, isNillable, null);
properties.add(ad);
代码示例来源:origin: geotools/geotools
fType = ftCache.get(new NameImpl(decl.getTargetNamespace(), decl.getName()));
内容来源于网络,如有侵权,请联系作者删除!