Tabnine Logo
org.eclipse.xsd
Code IndexAdd Tabnine to your IDE (free)

How to use org.eclipse.xsd

Best Java code snippets using org.eclipse.xsd (Showing top 20 results out of 315)

origin: geoserver/geoserver

namespaceURI = xsdSchema.getTargetNamespace();
origin: geoserver/geoserver

for (Iterator e = schema.getElementDeclarations().iterator(); e.hasNext(); ) {
  XSDElementDeclaration element = (XSDElementDeclaration) e.next();
  if (ft.getName().equals(element.getName())) {
    type = element.getTypeDefinition();
    break;
  for (Iterator t = schema.getTypeDefinitions().iterator(); t.hasNext(); ) {
    XSDTypeDefinition typedef = (XSDTypeDefinition) t.next();
    if ((ft.getName() + "_Type").equals(typedef.getName())) {
      type = typedef;
      break;
    for (Iterator c = children.iterator(); c.hasNext(); ) {
      XSDElementDeclaration ce = (XSDElementDeclaration) c.next();
      if (at.getName().equals(ce.getName())) {
        found = true;
        if (ce.getContainer() instanceof XSDParticle) {
          XSDParticle part = (XSDParticle) ce.getContainer();
          at.setMinOccurs(part.getMinOccurs());
          at.setMaxOccurs(part.getMaxOccurs());
origin: geotools/geotools

boolean forceQualified(XSDElementDeclaration e) {
  return namespaceAware
      && (e == null
          || e.isGlobal()
          || e.getSchema() == null
          || e.getSchema().getElementFormDefault() == XSDForm.QUALIFIED_LITERAL);
}
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

private XSDParticle buildParticle(XSDElementDeclaration declaration) {
  XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle();
  particle.setContent(declaration);
  particle.setMinOccurs(0);
  particle.setMaxOccurs(-1);
  return particle;
}
origin: geotools/geotools

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

private static boolean hasNoElementsNorTypes(XSDSchema schema) {
  if (schema == null) {
    return false;
  }
  return schema.getElementDeclarations().isEmpty() && schema.getTypeDefinitions().isEmpty();
}
origin: geotools/geotools

public AttributeEncodeExecutor(
    Object object, XSDAttributeDeclaration attribute, Document document, Logger logger) {
  this.object = object;
  this.attribute = attribute;
  this.document = document;
  this.logger = logger;
  encoding = document.createAttributeNS(attribute.getTargetNamespace(), attribute.getName());
}
origin: geotools/geotools

@Override
public AttributeType buildSuper() {
  XSDTypeDefinition baseType = xsdType.getBaseType();
  if (baseType != null && baseType.getName() != null && !baseType.equals(xsdType)) {
    return createType(baseType, DUMMY_DEPTH);
  } else {
    return null;
  }
}
origin: geotools/geotools

public int length(XSDTypeDefinition definition) {
  try {
    XSDSimpleTypeDefinition simple = definition.getSimpleType();
    XSDLengthFacet facet = simple.getLengthFacet();
    if (facet == null) {
      return Integer.MAX_VALUE;
    }
    return Integer.parseInt(facet.getLexicalValue());
  } catch (NumberFormatException ignore) {
    return Integer.MIN_VALUE;
  }
}
origin: geotools/geotools

  @Override
  public AttributeType buildSuper() {
    XSDTypeDefinition baseType = xsdType.getBaseType();
    if (baseType != null && baseType.getName() != null && !baseType.equals(xsdType)) {
      return createType(baseType, Integer.MAX_VALUE);
    } else {
      return null;
    }
  }
};
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

private boolean hasElement(XSDSchema schema, String elQName) {
  boolean elFound = false;
  EList<XSDElementDeclaration> elDeclList = schema.getElementDeclarations();
  for (XSDElementDeclaration elDecl : elDeclList) {
    if (elQName.equals(elDecl.getQName())) {
      elFound = true;
    }
  }
  return elFound;
}
origin: geotools/geotools

public XSDTypeDefinition getTypeDefinition() {
  return declaration.getTypeDefinition();
}
origin: geotools/geotools

public int length(XSDTypeDefinition definition) {
  try {
    XSDSimpleTypeDefinition simple = (XSDSimpleTypeDefinition) definition;
    XSDLengthFacet facet = simple.getLengthFacet();
    if (facet == null) {
      return Integer.MAX_VALUE;
    }
    return Integer.parseInt(facet.getLexicalValue());
  } catch (NumberFormatException ignore) {
    return Integer.MIN_VALUE;
  }
}
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

/**
 * Register schema
 *
 * @param schema schema to be registered
 */
public synchronized void register(XSDSchema schema) {
  schemaRegistry.put(schema.getSchemaLocation(), schema);
}
origin: geotools/geotools

  protected boolean included(XSDNamedComponent c) {
    return included != null ? included.contains( c.getName() ) : true;
  }
}
origin: geotools/geotools

public XSDTypeDefinition getTypeDefinition() {
  return decl.getTypeDefinition();
}
origin: geotools/geotools

public void testSchemaIdentiy() {
  assertNotNull(schema);
  assertNotNull(xsd);
  assertEquals("1.0", xsd.getVersion());
}
org.eclipse.xsd

Most used classes

  • XSDSchema
    A representation of the model object 'Schema [http://www.w3.org/TR/xmlschema-1/#Schemas]'. The foll
  • XSDElementDeclaration
    A representation of the model object 'Element Declaration [http://www.w3.org/TR/xmlschema-1/#cEleme
  • XSDParticle
    A representation of the model object 'Particle [http://www.w3.org/TR/xmlschema-1/#cParticles]'. The
  • XSDTypeDefinition
    A representation of the model object 'Type Definition'. It is used to represent aspects common to '
  • XSDFactory
    The Factory for the model. It provides a create method for each non-abstract class of the model.
  • XSDResourceImpl,
  • XSDAttributeDeclaration,
  • XSDImport,
  • XSDModelGroup,
  • XSDNamedComponent,
  • XSDAttributeUse,
  • XSDInclude,
  • XSDSchemaLocationResolver,
  • XSDSimpleTypeDefinition,
  • XSDAttributeGroupDefinition,
  • XSDLengthFacet,
  • XSDModelGroupDefinition,
  • XSDSchemaImpl,
  • XSDConcreteComponent
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now