Tabnine Logo
XmlSchemaEnumerationFacet
Code IndexAdd Tabnine to your IDE (free)

How to use
XmlSchemaEnumerationFacet
in
org.apache.ws.commons.schema

Best Java code snippets using org.apache.ws.commons.schema.XmlSchemaEnumerationFacet (Showing top 19 results out of 315)

origin: apache/cxf

@Override
public void writeSchema(XmlSchema root) {
  XmlSchemaSimpleType simple = new XmlSchemaSimpleType(root, true);
  simple.setName(getSchemaType().getLocalPart());
  XmlSchemaSimpleTypeRestriction restriction = new XmlSchemaSimpleTypeRestriction();
  restriction.setBaseTypeName(Constants.XSD_STRING);
  simple.setContent(restriction);
  Object[] constants = getTypeClass().getEnumConstants();
  List<XmlSchemaFacet> facets = restriction.getFacets();
  for (Object constant : constants) {
    XmlSchemaEnumerationFacet f = new XmlSchemaEnumerationFacet();
    f.setValue(getValue(constant));
    facets.add(f);
  }
}
origin: apache/cxf

/**
 * Retrieve the string values for an enumeration.
 * @param type
 */
public static List<String> enumeratorValues(XmlSchemaSimpleType type) {
  XmlSchemaSimpleTypeContent content = type.getContent();
  XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
  List<XmlSchemaFacet> facets = restriction.getFacets();
  List<String> values = new ArrayList<>();
  for (XmlSchemaFacet facet : facets) {
    XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
    values.add(enumFacet.getValue().toString());
  }
  return values;
}
origin: org.apache.ws.schema/XmlSchema

  facet = new XmlSchemaEnumerationFacet();
} else if (name.equals("fractionDigits")) {
  facet = new XmlSchemaFractionDigitsFacet();
origin: org.apache.ws.commons.schema/XmlSchema

  facet = new XmlSchemaEnumerationFacet();
} else if (name.equals("fractionDigits")) {
  facet = new XmlSchemaFractionDigitsFacet();
origin: org.apache.cxf/cxf-rt-databinding-aegis

@Override
public void writeSchema(XmlSchema root) {
  XmlSchemaSimpleType simple = new XmlSchemaSimpleType(root, true);
  simple.setName(getSchemaType().getLocalPart());
  XmlSchemaSimpleTypeRestriction restriction = new XmlSchemaSimpleTypeRestriction();
  restriction.setBaseTypeName(Constants.XSD_STRING);
  simple.setContent(restriction);
  Object[] constants = getTypeClass().getEnumConstants();
  List<XmlSchemaFacet> facets = restriction.getFacets();
  for (Object constant : constants) {
    XmlSchemaEnumerationFacet f = new XmlSchemaEnumerationFacet();
    f.setValue(getValue(constant));
    facets.add(f);
  }
}
origin: org.apache.cxf/cxf-core

/**
 * Retrieve the string values for an enumeration.
 * @param type
 */
public static List<String> enumeratorValues(XmlSchemaSimpleType type) {
  XmlSchemaSimpleTypeContent content = type.getContent();
  XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
  List<XmlSchemaFacet> facets = restriction.getFacets();
  List<String> values = new ArrayList<>();
  for (XmlSchemaFacet facet : facets) {
    XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
    values.add(enumFacet.getValue().toString());
  }
  return values;
}
origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

  facet = new XmlSchemaEnumerationFacet();
} else if (name.equals("fractionDigits")) {
  facet = new XmlSchemaFractionDigitsFacet();
origin: raml-org/raml-java-parser

final XmlSchemaEnumerationFacet enumValue = new XmlSchemaEnumerationFacet();
enumValue.setValue(anEnum);
content.getFacets().add(enumValue);
origin: org.apache.cxf/cxf-bundle-jaxrs

/**
 * Retrieve the string values for an enumeration.
 * @param type
 */
public static List<String> enumeratorValues(XmlSchemaSimpleType type) {
  XmlSchemaSimpleTypeContent content = type.getContent();
  XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
  List<XmlSchemaFacet> facets = restriction.getFacets();
  List<String> values = new ArrayList<String>();
  for (XmlSchemaFacet facet : facets) {
    XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
    values.add(enumFacet.getValue().toString());
  }
  return values;
}
origin: org.apache.axis2/axis2-kernel

List enumList = Arrays.asList(classType.getEnumConstants());
for(Object enumObj : enumList){        // add all enum constants to restriction facet
  restriction.getFacets().add(new XmlSchemaEnumerationFacet(enumObj.toString(), false));
origin: org.raml/raml-parser-2

final XmlSchemaEnumerationFacet enumValue = new XmlSchemaEnumerationFacet();
enumValue.setValue(anEnum);
content.getFacets().add(enumValue);
origin: org.apache.cxf/cxf-api

/**
 * Retrieve the string values for an enumeration.
 * @param type
 */
public static List<String> enumeratorValues(XmlSchemaSimpleType type) {
  XmlSchemaSimpleTypeContent content = type.getContent();
  XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
  List<XmlSchemaFacet> facets = restriction.getFacets();
  List<String> values = new ArrayList<String>();
  for (XmlSchemaFacet facet : facets) {
    XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
    values.add(enumFacet.getValue().toString());
  }
  return values;
}
origin: apache/axis2-java

List enumList = Arrays.asList(classType.getEnumConstants());
for(Object enumObj : enumList){        // add all enum constants to restriction facet
  restriction.getFacets().add(new XmlSchemaEnumerationFacet(enumObj.toString(), false));
origin: apache/cxf

while (node != null) {
  XmlSchemaEnumerationFacet enumeration = new XmlSchemaEnumerationFacet();
  enumeration.setValue(node.toString());
  enumSchemaSimpleTypeRestriction.getFacets().add(enumeration);
origin: org.apache.cxf/cxf-common-utilities

/**
 * Retrieve the string values for an enumeration.
 * @param type
 * @return
 */
public static List<String> enumeratorValues(XmlSchemaSimpleType type) {
  XmlSchemaSimpleTypeContent content = type.getContent();
  XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
  List<XmlSchemaFacet> facets = restriction.getFacets();
  List<String> values = new ArrayList<String>();
  for (XmlSchemaFacet facet : facets) {
    XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
    values.add(enumFacet.getValue().toString());
  }
  return values;
}
origin: apache/cxf

private Enum createCorbaEnum(XmlSchemaSimpleTypeRestriction restrictionType, QName name,
               QName schematypeName) {
  Enum corbaEnum = new Enum();
  corbaEnum.setType(schematypeName);
  corbaEnum.setName(name.getLocalPart());
  corbaEnum.setQName(name);
  corbaEnum.setRepositoryID(REPO_STRING + name.getLocalPart().replace('.', '/') + IDL_VERSION);
  for (XmlSchemaFacet f : restrictionType.getFacets()) {
    XmlSchemaEnumerationFacet val = (XmlSchemaEnumerationFacet)f;
    Enumerator enumerator = new Enumerator();
    enumerator.setValue(val.getValue().toString());
    corbaEnum.getEnumerator().add(enumerator);
  }
  return corbaEnum;
}
origin: org.apache.axis2/axis2-adb-codegen

if (restrictionName.equals(SchemaConstants.XSD_QNAME)) {
  String value = enumeration.getValue().toString();
  String prefix = value.substring(0, value.indexOf(":"));
  String localPart = value.substring(value.indexOf(":") + 1);
  metaInfHolder.addEnumFacet(qNameString);
} else {
  metaInfHolder.addEnumFacet(enumeration.getValue().toString());
origin: apache/axis2-java

if (restrictionName.equals(SchemaConstants.XSD_QNAME)) {
  String value = enumeration.getValue().toString();
  String prefix = value.substring(0, value.indexOf(":"));
  String localPart = value.substring(value.indexOf(":") + 1);
  metaInfHolder.addEnumFacet(qNameString);
} else {
  metaInfHolder.addEnumFacet(enumeration.getValue().toString());
origin: com.legsem.legstar/legstar-jaxbgen

injectJaxbTypeSafeEnumMemberAnnotation(jaxbNamespace,
    jaxbNamespacePrefix, enumerationFacet, enumerationFacet
        .getValue().toString());
org.apache.ws.commons.schemaXmlSchemaEnumerationFacet

Javadoc

Class for defining enumeration facets. Represents the World Wide Web Consortium (W3C) enumeration facet.

Most used methods

  • <init>
  • getValue
  • setValue

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top plugins for WebStorm
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