Codota Logo
StAXAttributeProcessor
Code IndexAdd Codota to your IDE (free)

How to use
StAXAttributeProcessor
in
org.apache.tuscany.sca.contribution.processor

Best Java code snippets using org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.apache.tuscany.sca/tuscany-contribution

public Object read(QName attributeName, XMLStreamReader inputSource, ProcessorContext context)
  throws ContributionReadException, XMLStreamException {
  return getProcessor().read(attributeName, inputSource, context);
}
origin: org.apache.tuscany.sca/tuscany-contribution

@SuppressWarnings("unchecked")
public void write(Object model, XMLStreamWriter outputSource, ProcessorContext context)
  throws ContributionWriteException, XMLStreamException {
  getProcessor().write(model, outputSource, context);
}
origin: org.apache.tuscany.sca/tuscany-contribution

public void removeArtifactProcessor(StAXAttributeProcessor<?> artifactProcessor) {
  if (artifactProcessor.getArtifactType() != null) {
    processorsByArtifactType.remove((Object)artifactProcessor.getArtifactType());
  }
  if (artifactProcessor.getModelType() != null) {
    processorsByModelType.remove(artifactProcessor.getModelType());
  }
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

@SuppressWarnings("unchecked")
public void resolve(Object model, ModelResolver resolver, ProcessorContext context)
  throws ContributionResolveException {
  getProcessor().resolve(model, resolver, context);
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

@SuppressWarnings("unchecked")
public void resolve(Object model, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
  // Delegate to the processor associated with the model type
  if (model != null) {
    StAXAttributeProcessor processor = processors.getProcessor(model.getClass());
    if (processor != null) {
      processor.resolve(model, resolver, context);
    }
  }
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

@SuppressWarnings("unchecked")
public void write(Object model, XMLStreamWriter outputSource, ProcessorContext context)
  throws ContributionWriteException, XMLStreamException {
  getProcessor().write(model, outputSource, context);
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

public Object read(QName attributeName, XMLStreamReader inputSource, ProcessorContext context)
  throws ContributionReadException, XMLStreamException {
  return getProcessor().read(attributeName, inputSource, context);
}
origin: org.apache.tuscany.sca/tuscany-contribution

public void addArtifactProcessor(StAXAttributeProcessor<?> artifactProcessor) {
  if (artifactProcessor.getArtifactType() != null) {
    processorsByArtifactType.put((Object)artifactProcessor.getArtifactType(), artifactProcessor);
  }
  if (artifactProcessor.getModelType() != null) {
    processorsByModelType.put(artifactProcessor.getModelType(), artifactProcessor);
  }
}
origin: org.apache.tuscany.sca/tuscany-contribution

@SuppressWarnings("unchecked")
public void resolve(Object model, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
  // Delegate to the processor associated with the model type
  if (model != null) {
    StAXAttributeProcessor processor = processors.getProcessor(model.getClass());
    if (processor != null) {
      processor.resolve(model, resolver, context);
    }
  }
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

/**
 *
 * @param writer
 * @param extensibleElement
 * @param extensionAttributeProcessor
 * @param context TODO
 * @param attributeModel
 * @throws ContributionWriteException
 * @throws XMLStreamException
 */
protected void writeExtendedAttributes(XMLStreamWriter writer,
                    Extensible extensibleElement,
                    StAXAttributeProcessor extensionAttributeProcessor, ProcessorContext context)
  throws ContributionWriteException, XMLStreamException {
  
  for (Extension extension : extensibleElement.getAttributeExtensions()) {
    if (extension.isAttribute()) {
      extensionAttributeProcessor.write(extension, writer, context);
    }
  }
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

  return processor.read(attributeName, source, context);
return processor == null ? null : processor.read(attributeName, source, context);
origin: org.apache.tuscany.sca/tuscany-base-runtime

public void addArtifactProcessor(StAXAttributeProcessor<?> artifactProcessor) {
  if (artifactProcessor.getArtifactType() != null) {
    processorsByArtifactType.put((Object)artifactProcessor.getArtifactType(), artifactProcessor);
  }
  if (artifactProcessor.getModelType() != null) {
    processorsByModelType.put(artifactProcessor.getModelType(), artifactProcessor);
  }
}
origin: org.apache.tuscany.sca/tuscany-contribution

@SuppressWarnings("unchecked")
public void resolve(Object model, ModelResolver resolver, ProcessorContext context)
  throws ContributionResolveException {
  getProcessor().resolve(model, resolver, context);
}
origin: org.apache.tuscany.sca/tuscany-contribution

@SuppressWarnings("unchecked")
public void write(Object model, XMLStreamWriter outputSource, ProcessorContext context) throws ContributionWriteException, XMLStreamException {
  if (model == null) {
    return;
  }
  // Delegate to the processor associated with the model type
  StAXAttributeProcessor processor = processors.getProcessor(model.getClass());
  if (processor == null) {
    if (!Extension.class.isInstance(model)) {
      if (logger.isLoggable(Level.WARNING)) {
        logger.warning("No StAX processor is configured to handle " + model.getClass());
      }
      warning(context.getMonitor(), "NoStaxProcessor", processors, model.getClass());
    }
  } else {
    processor.write(model, outputSource, context);
    return;
  }
  //handle extension attributes without processors
  processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE);
  if (processor == null) {
    if (logger.isLoggable(Level.WARNING)) {
      logger.warning("No Default StAX processor is configured to handle " + model.getClass());
    }
    warning(context.getMonitor(), "NoDefaultStaxProcessor", processors, model.getClass());
  } else {
    processor.write(model, outputSource, context);
    return;
  }
}
origin: org.apache.tuscany.sca/tuscany-contribution

  return processor.read(attributeName, source, context);
return processor == null ? null : processor.read(attributeName, source, context);
origin: org.apache.tuscany.sca/tuscany-base-runtime

public void removeArtifactProcessor(StAXAttributeProcessor<?> artifactProcessor) {
  if (artifactProcessor.getArtifactType() != null) {
    processorsByArtifactType.remove((Object)artifactProcessor.getArtifactType());
  }
  if (artifactProcessor.getModelType() != null) {
    processorsByModelType.remove(artifactProcessor.getModelType());
  }
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

@SuppressWarnings("unchecked")
public void write(Object model, XMLStreamWriter outputSource, ProcessorContext context) throws ContributionWriteException, XMLStreamException {
  if (model == null) {
    return;
  }
  // Delegate to the processor associated with the model type
  StAXAttributeProcessor processor = processors.getProcessor(model.getClass());
  if (processor == null) {
    if (!Extension.class.isInstance(model)) {
      if (logger.isLoggable(Level.WARNING)) {
        logger.warning("No StAX processor is configured to handle " + model.getClass());
      }
      warning(context.getMonitor(), "NoStaxProcessor", processors, model.getClass());
    }
  } else {
    processor.write(model, outputSource, context);
    return;
  }
  //handle extension attributes without processors
  processor = (StAXAttributeProcessor<?>)processors.getProcessor(ANY_ATTRIBUTE);
  if (processor == null) {
    if (logger.isLoggable(Level.WARNING)) {
      logger.warning("No Default StAX processor is configured to handle " + model.getClass());
    }
    warning(context.getMonitor(), "NoDefaultStaxProcessor", processors, model.getClass());
  } else {
    processor.write(model, outputSource, context);
    return;
  }
}
origin: org.apache.tuscany.sca/tuscany-contribution

if (attributeName.getNamespaceURI() != null && attributeName.getNamespaceURI().length() > 0) {
  if (!elementName.getNamespaceURI().equals(attributeName.getNamespaceURI())) {
    Object attributeValue = extensionAttributeProcessor.read(attributeName, reader, context);
    Extension attributeExtension;
    if (attributeValue instanceof Extension) {
origin: org.apache.tuscany.sca/tuscany-contribution

/**
 *
 * @param writer
 * @param extensibleElement
 * @param extensionAttributeProcessor
 * @param context TODO
 * @param attributeModel
 * @throws ContributionWriteException
 * @throws XMLStreamException
 */
protected void writeExtendedAttributes(XMLStreamWriter writer,
                    Extensible extensibleElement,
                    StAXAttributeProcessor extensionAttributeProcessor, ProcessorContext context)
  throws ContributionWriteException, XMLStreamException {
  
  for (Extension extension : extensibleElement.getAttributeExtensions()) {
    if (extension.isAttribute()) {
      extensionAttributeProcessor.write(extension, writer, context);
    }
  }
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

if (attributeName.getNamespaceURI() != null && attributeName.getNamespaceURI().length() > 0) {
  if (!elementName.getNamespaceURI().equals(attributeName.getNamespaceURI())) {
    Object attributeValue = extensionAttributeProcessor.read(attributeName, reader, context);
    Extension attributeExtension;
    if (attributeValue instanceof Extension) {
org.apache.tuscany.sca.contribution.processorStAXAttributeProcessor

Javadoc

An artifact processor that can read attributes from a StAX XMLStreamReader.

Most used methods

  • read
    Reads a model from an XMLStreamReader.
  • write
    Writes a model to an XMLStreamWriter.
  • getArtifactType
    Returns the type of artifact handled by this artifact processor.
  • getModelType
  • resolve

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • setContentView (Activity)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now