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

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

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

XSDSchema.getAttributeDeclarations介绍

[英]Returns the value of the 'Attribute Declarations' reference list. The list contents are of type org.eclipse.xsd.XSDAttributeDeclaration.

This represents the attribute declarations infoset property. It is computed from the #getContents() and should typically not be set directly.
[中]返回“属性声明”引用列表的值。列表内容的类型为org。日食xsd。XSDAT表示感谢。
这表示attribute declarationsinfoset属性。它是根据#getContents()计算的,通常不应直接设置。

代码示例

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

protected void buildAttriubuteIndex() {
  attributeIndex = new HashMap();
  for (int i = 0; i < schemas.length; i++) {
    XSDSchema schema = schemas[i];
    for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext(); ) {
      XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next();
      QName qName = new QName(attribute.getTargetNamespace(), attribute.getName());
      attributeIndex.put(qName, attribute);
    }
  }
}

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

List attributes = schema.getAttributeDeclarations();
for (Iterator itr = attributes.iterator(); itr.hasNext();) {
  XSDAttributeDeclaration attribute = (XSDAttributeDeclaration)itr.next();

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

List attributes = schema.getAttributeDeclarations();

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

for ( Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext(); ) {
  XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next();
  if ( attribute.getAnonymousTypeDefinition() != null ) {

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

if (type == null) {
  for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext();) {
    XSDAttributeDeclaration ad = (XSDAttributeDeclaration) a.next();
    if (Utilities.equals(ad.getTargetNamespace(), attribute.getTargetNamespace())

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

if (type == null) {
  for (XSDAttributeDeclaration ad : schema.getAttributeDeclarations()) {
    if (Utilities.equals(ad.getTargetNamespace(),
        attribute.getTargetNamespace())

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

protected void buildAttriubuteIndex() {
  attributeIndex = new HashMap();
  for (int i = 0; i < schemas.length; i++) {
    XSDSchema schema = schemas[i];
    for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext();) {
      XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next();
      QName qName = new QName(attribute.getTargetNamespace(), attribute.getName());
      attributeIndex.put(qName, attribute);
    }
  }
}

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

protected void buildAttriubuteIndex() {
  attributeIndex = new HashMap();
  for (int i = 0; i < schemas.length; i++) {
    XSDSchema schema = schemas[i];
    for (Iterator a = schema.getAttributeDeclarations().iterator(); a.hasNext();) {
      XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a.next();
      QName qName = new QName(attribute.getTargetNamespace(), attribute.getName());
      attributeIndex.put(qName, attribute);
    }
  }
}

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

protected void buildAttriubuteIndex() {
  attributeIndex = new HashMap();
  for (int i = 0; i < schemas.length; i++) {
    XSDSchema schema = schemas[i];
    for (Iterator a = schema.getAttributeDeclarations().iterator();
        a.hasNext();) {
      XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) a
        .next();
      QName qName = new QName(attribute.getTargetNamespace(),
          attribute.getName());
      attributeIndex.put(qName, attribute);
    }
  }
}

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

protected XSDAttributeDeclaration setGlobalAttributeReference(XSDSchema xsdSchema)
{
 List list = xsdSchema.getAttributeDeclarations();
 XSDAttributeDeclaration referencedAttribute = null;
 boolean isUserDefined = false;
 for (Iterator i = list.iterator(); i.hasNext(); )
 {
  Object obj = i.next();
  if (obj instanceof XSDAttributeDeclaration)
  {
   XSDAttributeDeclaration attr = (XSDAttributeDeclaration) obj;
   if (!XSDConstants.SCHEMA_INSTANCE_URI_2001.equals(attr.getTargetNamespace()))
   {
    referencedAttribute = attr;
    isUserDefined = true;
    break;
   }
  }
 }
 if (!isUserDefined)
 {
  referencedAttribute = createGlobalXSDAttributeDeclaration(xsdSchema);
  Text textNode = xsdSchema.getDocument().createTextNode("\n"); //$NON-NLS-1$
  xsdSchema.getElement().appendChild(textNode);
  xsdSchema.getContents().add(referencedAttribute);
 }
 return referencedAttribute;
}

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

public java.util.List getGlobalAttributes()
{
 Vector items = new Vector();
 if (xsdSchema != null)
 {
  updateExternalImportGlobals();
  if (xsdSchema.getAttributeDeclarations() != null)
  {
   Iterator i = xsdSchema.getAttributeDeclarations().iterator();
   while (i.hasNext())
   {
    XSDAttributeDeclaration attributeDeclaration = (XSDAttributeDeclaration) i.next();
    if (attributeDeclaration.getTargetNamespace() == null || (attributeDeclaration.getTargetNamespace() != null && !attributeDeclaration.getTargetNamespace().equals(XSDConstants.SCHEMA_INSTANCE_URI_2001)))
    {
     String name = attributeDeclaration.getQName(xsdSchema);
     if (name != null)
     {
      items.add(name);
     }
    }
   }
  }
  //      items = addExternalImportedAttributes(items);
  items = (Vector) sortList(items);
 }
 return items;
}

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

List attributes = xsdSchema.getAttributeDeclarations();
String targetNamespace = xsdSchema.getTargetNamespace();

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

protected XSDAttributeDeclaration createGlobalXSDAttributeDeclaration(XSDSchema xsdSchema)
{
 ensureSchemaElement(xsdSchema);
 XSDAttributeDeclaration attribute = XSDFactory.eINSTANCE.createXSDAttributeDeclaration();
 attribute.setTypeDefinition(xsdSchema.getSchemaForSchema().resolveSimpleTypeDefinition("string")); //$NON-NLS-1$
 attribute.setName(XSDCommonUIUtils.createUniqueElementName("NewAttribute", xsdSchema.getAttributeDeclarations())); //$NON-NLS-1$
 Text textNode = xsdSchema.getDocument().createTextNode("\n"); //$NON-NLS-1$
 xsdSchema.getElement().appendChild(textNode);
 xsdSchema.getContents().add(attribute);
 return attribute;
}

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

public void visitSchema(XSDSchema schema)
 for (Iterator iterator = schema.getAttributeDeclarations().iterator(); iterator.hasNext();)

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

public List getAttributeList(XSDSchema xsdSchema, boolean showFromIncludes)
 for (Iterator iter = xsdSchema.getAttributeDeclarations().iterator(); iter.hasNext();)

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

public void visitSchema(XSDSchema schema)
 for (Iterator iterator = schema.getAttributeDeclarations().iterator(); iterator.hasNext();)

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

xsiSchemas.iterator().next().getAttributeDeclarations());

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

(XSDEditPlugin.INSTANCE.getString("_UI_Attributes_label"),
   XSDEditPlugin.INSTANCE.getImage("full/obj16/XSDAttributeDeclaration"),
   xsdSchema.getAttributeDeclarations()));
children.add
 (new ChildItemProvider

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

public void propogateComponents(XSDSchema otherXSDSchema)
{
 otherXSDSchema.getAnnotations().addAll(getAnnotations());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getAttributeDeclarations(), getAttributeDeclarations());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getAttributeGroupDefinitions(), getAttributeGroupDefinitions());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getElementDeclarations(), getElementDeclarations());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getModelGroupDefinitions(), getModelGroupDefinitions());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getTypeDefinitions(), getTypeDefinitions());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getNotationDeclarations(), getNotationDeclarations());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getIdentityConstraintDefinitions(), getIdentityConstraintDefinitions());
}

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

public void propogateComponents(XSDSchema otherXSDSchema)
{
 otherXSDSchema.getAnnotations().addAll(getAnnotations());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getAttributeDeclarations(), getAttributeDeclarations());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getAttributeGroupDefinitions(), getAttributeGroupDefinitions());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getElementDeclarations(), getElementDeclarations());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getModelGroupDefinitions(), getModelGroupDefinitions());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getTypeDefinitions(), getTypeDefinitions());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getNotationDeclarations(), getNotationDeclarations());
 XSDNamedComponentImpl.mergeToSortedList
  (otherXSDSchema.getIdentityConstraintDefinitions(), getIdentityConstraintDefinitions());
}

相关文章

微信公众号

最新文章

更多