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

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

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

XSDNamedComponent.getTargetNamespace介绍

[英]Returns the value of the 'Target Namespace' attribute.

This represents the value of the attribute declaration target namespace, attribute group definition target namespace, complex type definition target namespace, element declaration target namespace, identity constraint definition target namespace, model group definition target namespace, notation declaration target namespace, or simple type definition target namespace (*) infoset property. It is computed from the org.eclipse.xsd.XSDSchema#getTargetNamespace() of the schema and should typically not be set directly; in the case of locally scoped org.eclipse.xsd.XSDFeature, the value is also affected by the org.eclipse.xsd.XSDFeature#getForm.
[中]返回“目标命名空间”属性的值。
这表示属性声明{$0$}、属性组定义{$1$}、复杂类型定义target namespace、元素声明{$3$}、标识约束定义{$4$}、模型组定义{$5$}、符号声明{$6$}或简单类型定义{$7$}({$8$})信息集属性的值。它是从组织中计算出来的。日食xsd。XSDSchema#getTargetNamespace(),通常不应直接设置;对于本地范围的组织。日食xsd。XSDFeature,该值也受组织的影响。日食xsd。XSDFeature#getForm。

代码示例

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

public GetPropertyExecutor(Object parent, XSDNamedComponent content) {
  this.parent = parent;
  name = new QName(content.getTargetNamespace(), content.getName());
}

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

boolean target(XSDNamedComponent c, XSDSchema schema) {
  return c.getTargetNamespace().equals(schema.getTargetNamespace());
}

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

/**
 * Convenience method for getting the name of a component.
 */
protected final Name name(XSDNamedComponent component) {
  if (component.getName() == null) {
    logger.warning("Anonymous component: " + component);
  }
  return new NameImpl(component.getTargetNamespace(), component.getName());
}

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

stringBuffer.append(named.getTargetNamespace());
stringBuffer.append(TEXT_2);
stringBuffer.append(named.getName());

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

stringBuffer.append(desc);
stringBuffer.append(TEXT_6);
stringBuffer.append(named.getTargetNamespace());
stringBuffer.append(TEXT_7);
stringBuffer.append(named.getName());

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

String ns1 = component.getTargetNamespace();
String ns2 = qName.getNamespaceURI();
String n1 = component.getName();

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

bindingName =
    new QName(
        base.getTargetNamespace(),
        base.getName() + "_" + anonymous.getName());

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

boolean contains(XSDNamedComponent c, List l) {
  boolean contains = false;
  for (Iterator i = l.iterator(); !contains && i.hasNext(); ) {
    XSDNamedComponent e = (XSDNamedComponent) i.next();
    if (e.getName().equals(c.getName())) {
      if (e.getTargetNamespace() == null) {
        contains = c.getTargetNamespace() == null;
      } else {
        contains = e.getTargetNamespace().equals(c.getTargetNamespace());
      }
    }
  }
  return contains;
}

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

public GetPropertyExecutor(Object parent, XSDNamedComponent content) {
  this.parent = parent;
  
  name = new QName(content.getTargetNamespace(),content.getName());
}

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

public GetPropertyExecutor(Object parent, XSDNamedComponent content) {
  this.parent = parent;
  name = new QName(content.getTargetNamespace(), content.getName());
}

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

public GetPropertyExecutor(Object parent, XSDNamedComponent content) {
  this.parent = parent;
  name = new QName(content.getTargetNamespace(), content.getName());
}

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

protected boolean isFromThisNamespace(XSDNamedComponent xsdNamedComponent)
{
 String targetNamespace = xsdNamedComponent.getTargetNamespace();
 return targetNamespace == null ? xsdSchema.getTargetNamespace() == null : targetNamespace.equals(xsdSchema.getTargetNamespace());
}

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

protected boolean isFromThisNamespace(XSDNamedComponent xsdNamedComponent)
{
 String targetNamespace = xsdNamedComponent.getTargetNamespace();
 return targetNamespace == null ? xsdSchema.getTargetNamespace() == null : targetNamespace.equals(xsdSchema.getTargetNamespace());
}

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

public boolean hasSameNameAndTargetNamespace(XSDNamedComponent xsdNamedComponent)
{
 return 
  (getTargetNamespace() == null ?  
    xsdNamedComponent.getTargetNamespace() == null : 
    getTargetNamespace().equals(xsdNamedComponent.getTargetNamespace())) &&
  (getName() == null ?  
    xsdNamedComponent.getName() == null : 
    getName().equals(xsdNamedComponent.getName()));
}

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

public boolean hasSameNameAndTargetNamespace(XSDNamedComponent xsdNamedComponent)
{
 return 
  (getTargetNamespace() == null ?  
    xsdNamedComponent.getTargetNamespace() == null : 
    getTargetNamespace().equals(xsdNamedComponent.getTargetNamespace())) &&
  (getName() == null ?  
    xsdNamedComponent.getName() == null : 
    getName().equals(xsdNamedComponent.getName()));
}

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

public String getQualifier(Object component)
{
 String result = null;
 if (component instanceof ComponentSpecification)
 {
  result = ((ComponentSpecification)component).getQualifier();
 }  
 else if (component instanceof XSDNamedComponent)
 {
  result = ((XSDNamedComponent)component).getTargetNamespace(); 
 }  
 else if (component instanceof SearchMatch)
 {
  QualifiedName qualifiedName = getQualifiedNameForSearchMatch((SearchMatch)component);
  if (qualifiedName != null)
  {  
   result = qualifiedName.getNamespace();
  }    
 }  
 return result;
}

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

public void validateNoDuplicates(String componentNoun, EList<? extends XSDNamedComponent> xsdNamedComponents)
{
 String name = null;
 String targetNamespace = null;
 for (XSDNamedComponent xsdNamedComponent :  xsdNamedComponents)
 {
  if (xsdNamedComponent.hasNameAndTargetNamespace(name, targetNamespace))
  {
   getDiagnosticTarget(xsdNamedComponent).createDiagnostic
    (XSDDiagnosticSeverity.ERROR_LITERAL, 
     "coss-schema.2",
     XSDPlugin.INSTANCE.getString(componentNoun),
     xsdNamedComponent.getURI());
  }
  name = xsdNamedComponent.getName();
  targetNamespace = xsdNamedComponent.getTargetNamespace();
 }
}

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

public void validateNoDuplicates(String componentNoun, EList<? extends XSDNamedComponent> xsdNamedComponents)
{
 String name = null;
 String targetNamespace = null;
 for (XSDNamedComponent xsdNamedComponent :  xsdNamedComponents)
 {
  if (xsdNamedComponent.hasNameAndTargetNamespace(name, targetNamespace))
  {
   getDiagnosticTarget(xsdNamedComponent).createDiagnostic
    (XSDDiagnosticSeverity.ERROR_LITERAL, 
     "coss-schema.2",
     XSDPlugin.INSTANCE.getString(componentNoun),
     xsdNamedComponent.getURI());
  }
  name = xsdNamedComponent.getName();
  targetNamespace = xsdNamedComponent.getTargetNamespace();
 }
}

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

public void run()
 {
  String pattern = "";
  XSDNamedComponent component = getXSDNamedComponent();
  IFile file = getCurrentFile();
  if (file != null && component != null)
  {
   QualifiedName metaName = determineMetaName(component);
   QualifiedName elementQName = new QualifiedName(component.getTargetNamespace(), component.getName());
   SearchScope scope = new WorkspaceSearchScope();
   String scopeDescription = "Workspace";
   XSDSearchQuery searchQuery = new XSDSearchQuery(pattern, file, elementQName, metaName, XSDSearchQuery.LIMIT_TO_REFERENCES, scope, scopeDescription);
   NewSearchUI.activateSearchResultView();
   NewSearchUI.runQueryInBackground(searchQuery);
  }
 }
}

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

public void run()
 {
  String pattern = "";
  XSDNamedComponent component = getXSDNamedComponent();
  IFile file = getCurrentFile();
  if (file != null && component != null)
  {
   QualifiedName metaName = determineMetaName(component);
   QualifiedName elementQName = new QualifiedName(component.getTargetNamespace(), component.getName());
   IPath fullPath = file.getFullPath();
   ProjectSearchScope scope = new ProjectSearchScope(fullPath);
   String scopeDescription = "Project";
   XSDSearchQuery searchQuery = new XSDSearchQuery(pattern, file, elementQName, metaName, XSDSearchQuery.LIMIT_TO_REFERENCES, scope, scopeDescription);
   NewSearchUI.activateSearchResultView();
   NewSearchUI.runQueryInBackground(searchQuery);
  }
 }
}

相关文章