Package org.teiid.core

Examples of org.teiid.core.TeiidComponentException


                uri = NodeDescriptor.DEFAULT_NAMESPACE_URI;
            } else if(namespacePrefix.equals(MappingNodeConstants.INSTANCES_NAMESPACE_PREFIX)) {
                uri = MappingNodeConstants.INSTANCES_NAMESPACE;
            }else {
                String msg = QueryPlugin.Util.getString("XMLPlanner.no_uri", new Object[] {namespacePrefix, name}); //$NON-NLS-1$
                throw new TeiidComponentException(msg);
            }
        }
       
        //create NodeDescriptor
        NodeDescriptor descriptor = new NodeDescriptor(name, getQName(name, namespacePrefix), namespacePrefix, uri, namespaceDeclarations, defaultValue, isOptional, isElement, textNormalizationMode, runtimeType, docBuiltInType);
View Full Code Here


     */
    public XMLContext process(XMLProcessorEnvironment env, XMLContext context)
        throws BlockedException, TeiidComponentException, TeiidProcessingException{

        LogManager.logTrace(org.teiid.logging.LogConstants.CTX_XML_PLAN, "ABORT processing now."); //$NON-NLS-1$
        throw new TeiidComponentException(DEFAULT_MESSAGE);
    }
View Full Code Here

        try {
      //SAX2.0 ContentHandler
      handler = factory.newTransformerHandler();
      handler.setResult(new StreamResult(fsisf.getOuputStream()));
    } catch (Exception e) {
      throw new TeiidComponentException(e);
    }
        transformer = handler.getTransformer();
        transformer.setOutputProperty(OutputKeys.ENCODING, encoding);
    }
View Full Code Here

   */
  public void markAsFinished() throws TeiidComponentException{
    try {
      endDocument();
    } catch (SAXException e) {
      throw new TeiidComponentException(e);
    }
    finished = true;
  }
View Full Code Here

        }

        try {
      return new Evaluator(elementMap, env.getDataManager(), env.getProcessorContext()).evaluate(this.criteria, data);
    } catch (ExpressionEvaluationException e) {
            throw new TeiidComponentException(e);
    }
  }
View Full Code Here

                if (tuple != null) {
                    // Assumption: the number of returned tuples exactly equals the number of commands submitted
                    addBatchRow(Arrays.asList(new Object[] {tuple.get(0)}));
                } else {
                    // Should never happen since the number of expected results is known
                    throw new TeiidComponentException(QueryPlugin.Util.getString("BatchedUpdateNode.unexpected_end_of_batch", commandCount, numExpectedCounts)); //$NON-NLS-1$
                }
            }
        }
        // This is the only tuple batch we need.
        terminateBatches();
View Full Code Here

   */
  public boolean hasNext() throws TeiidComponentException{
      try {
            return tupleSourceIterator.hasNext();
        } catch (TeiidProcessingException err) {
            throw new TeiidComponentException(err, err.getMessage());
        }
  }
View Full Code Here

   */
  public Object next() throws TeiidComponentException{
      try {
            return tupleSourceIterator.nextTuple().get(columnIndex);
        } catch (TeiidProcessingException err) {
            throw new TeiidComponentException(err, err.getMessage());
        }
  }
View Full Code Here

       
        if (!success){
            String elem = (isElement ? QueryPlugin.Util.getString("AddNodeInstruction.element__1" ) : QueryPlugin.Util.getString("AddNodeInstruction.attribute__2")); //$NON-NLS-1$ //$NON-NLS-2$
            Object[] params = new Object[]{elem, this.descriptor.getQName(), this.descriptor.getNamespaceURI(), this.descriptor.getNamespaceURIs()};
            String msg = QueryPlugin.Util.getString("AddNodeInstruction.Unable_to_add_xml_{0}_{1},_namespace_{2},_namespace_declarations_{3}_3", params); //$NON-NLS-1$
            throw new TeiidComponentException(msg);
        }
       
        env.incrementCurrentProgramCounter();
        return context;
    }
View Full Code Here

  }
   
  public int read(long fileOffset, byte[] b, int offSet, int length)
      throws TeiidComponentException {
    if (removed) {
      throw new TeiidComponentException("already removed"); //$NON-NLS-1$
    }
    return readDirect(fileOffset, b, offSet, length);
  }
View Full Code Here

TOP

Related Classes of org.teiid.core.TeiidComponentException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.