org.eclipse.xsd.XSDElementDeclaration.setTargetNamespace()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中org.eclipse.xsd.XSDElementDeclaration.setTargetNamespace()方法的一些代码示例,展示了XSDElementDeclaration.setTargetNamespace()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDElementDeclaration.setTargetNamespace()方法的具体详情如下:
包路径:org.eclipse.xsd.XSDElementDeclaration
类名称:XSDElementDeclaration
方法名:setTargetNamespace

XSDElementDeclaration.setTargetNamespace介绍

暂无

代码示例

代码示例来源:origin: geotools/geotools

DelegatingHandler(ParserDelegate delegate, QName elementName, Handler parent) {
  this.delegate = delegate;
  this.parent = parent;
  this.elementName = elementName;
  // create a parse tree
  XSDElementDeclaration e = XSDFactory.eINSTANCE.createXSDElementDeclaration();
  e.setTargetNamespace(elementName.getNamespaceURI());
  e.setName(elementName.getLocalPart());
  ElementImpl instance = new ElementImpl(e);
  instance.setName(elementName.getLocalPart());
  instance.setNamespace(elementName.getNamespaceURI());
  parseTree = new NodeImpl(instance);
}

代码示例来源:origin: geotools/geotools

XSDElementDeclaration clone =
    (XSDElementDeclaration) e.cloneConcreteComponent(false, false);
clone.setTargetNamespace(GML.NAMESPACE);

代码示例来源:origin: geotools/geotools

root.setTargetNamespace(name.getNamespaceURI());
root.setTypeDefinition(type);

代码示例来源:origin: geotools/geotools

elementDecl.setTargetNamespace(Encoder.COMMENT.getNamespaceURI());
elementDecl.setName(Encoder.COMMENT.getLocalPart());
elementDecl.setElement(comment);

代码示例来源:origin: geotools/geotools

decl.setTargetNamespace(qualifiedName.getNamespaceURI());

代码示例来源:origin: geotools/geotools

XSDParticle particle(Attribute att) {
    XSDFactory factory = XSDFactory.eINSTANCE;

    AttributeType attType = att.getType();
    XSDTypeDefinition xsdType =
        schemaIndex.getTypeDefinition(
            new QName(
                attType.getName().getNamespaceURI(),
                attType.getName().getLocalPart()));

    XSDElementDeclaration element = factory.createXSDElementDeclaration();
    element.setName(att.getName().getLocalPart());
    element.setTargetNamespace(att.getName().getNamespaceURI());
    element.setTypeDefinition(xsdType);

    XSDParticle particle = factory.createXSDParticle();
    particle.setContent(element);
    return particle;
  }
}

代码示例来源:origin: geotools/geotools

element.setTargetNamespace(attributeNs);
} else {
  element.setTargetNamespace(featureType.getName().getNamespaceURI());

代码示例来源:origin: geotools/geotools

public FeatureTypeContext(SimpleFeature f, GMLDelegate gml) {
  this.featureType = f.getFeatureType();
  QName featureName =
      new QName(
          featureType.getName().getNamespaceURI(),
          featureType.getName().getLocalPart());
  // look up the element in the schema
  XSDElementDeclaration element =
      encoder.getSchemaIndex().getElementDeclaration(featureName);
  if (element == null) {
    // create one
    element = XSDFactory.eINSTANCE.createXSDElementDeclaration();
    element.setName(featureType.getName().getLocalPart());
    element.setTargetNamespace(featureType.getName().getNamespaceURI());
    element.setTypeDefinition(
        encoder.getSchemaIndex().getTypeDefinition(GML.AbstractFeatureType));
  }
  // look up all the bindings for each property
  BindingLoader bindingLoader = encoder.getBindingLoader();
  // get all the properties
  List properties = gml.getFeatureProperties(f, element, encoder);
  attributes = setupAttributeContexts(properties, featureType, bindingLoader);
  featureQualifiedName = getFeatureQualifiedName(featureName);
}

代码示例来源:origin: geotools/geotools

element.setTargetNamespace(instance.getNamespace());

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

protected XSDElementDeclaration createUnresolvedElementDeclaration(String namespace, String localName)
{
 XSDElementDeclaration xsdElementDeclaration = XSDFactory.eINSTANCE.createXSDElementDeclaration();
 if (localName != null)
 {
  xsdElementDeclaration.setName(localName);
 }
 if (namespace != null)
 {
  xsdElementDeclaration.setTargetNamespace(namespace);
 }
 xsdElementDeclaration.setResolvedElementDeclaration(xsdElementDeclaration);
 return xsdElementDeclaration;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

protected XSDElementDeclaration createUnresolvedElementDeclaration(String namespace, String localName)
{
 XSDElementDeclaration xsdElementDeclaration = XSDFactory.eINSTANCE.createXSDElementDeclaration();
 if (localName != null)
 {
  xsdElementDeclaration.setName(localName);
 }
 if (namespace != null)
 {
  xsdElementDeclaration.setTargetNamespace(namespace);
 }
 xsdElementDeclaration.setResolvedElementDeclaration(xsdElementDeclaration);
 return xsdElementDeclaration;
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public void visitElementDeclaration(XSDElementDeclaration element)
 {
  super.visitElementDeclaration(element);
  if (element.isElementDeclarationReference())
  {
    if (element.getResolvedElementDeclaration().getTargetNamespace() != null)
    {
     if (element.getResolvedElementDeclaration().getTargetNamespace().equals(oldNS))
    {
     // set the resolved element's declaration to new ns
     // this is defect 237518 - target namespace rename creates a new namespace
     element.getResolvedElementDeclaration().setTargetNamespace(newNS);
    }
   }
   else
   {
     if (oldNS == null || (oldNS != null && oldNS.equals("")))
     {
           element.getResolvedElementDeclaration().setTargetNamespace(newNS);
     }
   }
  }
 }
}

代码示例来源:origin: org.geotools.xsd/gt-core

elementDecl.setTargetNamespace(Encoder.COMMENT.getNamespaceURI());
elementDecl.setName(Encoder.COMMENT.getLocalPart());
elementDecl.setElement(comment);

代码示例来源:origin: org.geoserver/gs-wfs

private void buildSchemaContent(
    FeatureTypeInfo featureTypeMeta, XSDSchema schema, XSDFactory factory, String baseUrl)
    throws IOException {
  if (!findTypeInSchema(featureTypeMeta, schema, factory)) {
    // build the type manually
    FeatureType featureType = featureTypeMeta.getFeatureType();
    if (featureTypeMeta.isCircularArcPresent() && this.getClass().equals(GML3.class)) {
      featureType = new CurveTypeWrapper(featureType);
    }
    XSDComplexTypeDefinition xsdComplexType =
        buildComplexSchemaContent(featureType, schema, factory);
    XSDElementDeclaration element = factory.createXSDElementDeclaration();
    element.setName(featureTypeMeta.getName());
    element.setTargetNamespace(featureTypeMeta.getNamespace().getURI());
    synchronized (Schemas.class) {
      // this call changes the global schemas too, need to be synchronized
      element.setSubstitutionGroupAffiliation(getFeatureElement());
    }
    element.setTypeDefinition(xsdComplexType);
    schema.getContents().add(element);
    schema.updateElement();
  }
}

代码示例来源:origin: org.geoserver/gs-wfs

element.setTargetNamespace(featureTypeMeta.getNamespace().getURI());
synchronized (Schemas.class) {
  element.setSubstitutionGroupAffiliation(getFeatureElement());

代码示例来源:origin: org.geotools.xsd/gt-xsd-wfs

XSDParticle particle(Attribute att) {
  XSDFactory factory = XSDFactory.eINSTANCE;
  AttributeType attType = att.getType();
  XSDTypeDefinition xsdType = schemaIndex.getTypeDefinition(
    new QName(attType.getName().getNamespaceURI(), attType.getName().getLocalPart()));
  XSDElementDeclaration element = factory.createXSDElementDeclaration();
  element.setName(att.getName().getLocalPart());
  element.setTargetNamespace(att.getName().getNamespaceURI());
  element.setTypeDefinition(xsdType);
  
  XSDParticle particle = factory.createXSDParticle();
  particle.setContent(element);
  return particle;
}

代码示例来源:origin: org.geotools/gt2-xml-core

element.setTargetNamespace(instance.getNamespace());

代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit

if (namespace != null)
 child.setTargetNamespace(namespace);

代码示例来源:origin: org.geotools.xsd/gt-core

element.setTargetNamespace(instance.getNamespace());

代码示例来源:origin: org.geotools/gt2-xml-xsd

element.setTargetNamespace( instance.getNamespace() );

相关文章

微信公众号

最新文章

更多

XSDElementDeclaration类方法