Package railo.runtime.type

Examples of railo.runtime.type.ArrayImpl


        Array arr = Caster.toArray(o,null);
        if(arr!=null){
         
          // convert the values
          Iterator<Entry<Key, Object>> it = arr.entryIterator();
          Array _arr=new ArrayImpl();
          Entry<Key, Object> e;
          Object src,trg;
          boolean hasChanged=false;
          while(it.hasNext()){
            e = it.next();
            src=e.getValue();
            trg=castTo(pc, _type, _strType, src);
            _arr.setEL(e.getKey(), trg);
            if(src!=trg) hasChanged=true;
          }
          if(!hasChanged) return arr;
          return _arr;
        }
View Full Code Here


     
      long creationTime=System.currentTimeMillis();
     
   
    Struct sct=new StructImpl();
    ArrayImpl arr=new ArrayImpl();
    {
      Iterator<UDF> it = icfc.udfs.values().iterator();
          while(it.hasNext()) {
            arr.append(it.next().getMetaData(pc));
          }
    }
       
        if(icfc.meta!=null) {
          Iterator it = icfc.meta.entrySet().iterator();
          Map.Entry entry;
          while(it.hasNext()){
            entry=(Entry) it.next();
            sct.setEL(KeyImpl.toKey(entry.getKey()), entry.getValue());
          }
        }
       
       
        if(!StringUtil.isEmpty(icfc.hint,true))sct.set(KeyConstants._hint,icfc.hint);
        if(!StringUtil.isEmpty(icfc.dspName,true))sct.set(KeyConstants._displayname,icfc.dspName);
        init(pc,icfc);
        if(!ArrayUtil.isEmpty(icfc.superInterfaces)){
            Set<String> _set = railo.runtime.type.util.ListUtil.listToSet(icfc.extend,',',true);
            Struct ex=new StructImpl();
          sct.set(KeyConstants._extends,ex);
          for(int i=0;i<icfc.superInterfaces.length;i++){
            if(!_set.contains(icfc.superInterfaces[i].getCallPath())) continue;
            ex.setEL(KeyImpl.init(icfc.superInterfaces[i].getCallPath()),_getMetaData(pc,icfc.superInterfaces[i],true));
          }
         
        }
       
        if(arr.size()!=0)sct.set(KeyConstants._functions,arr);
        PageSource ps = icfc.pageSource;
        sct.set(KeyConstants._name,ps.getComponentName());
        sct.set(KeyConstants._fullname,ps.getComponentName());
      
        sct.set(KeyConstants._path,ps.getDisplayPath());
View Full Code Here

       
        if(offset <= strInput.length() && matcher.contains(input, pattern)) {
            MatchResult result = matcher.getMatch();
           
            int groupCount = result.groups();
            Array posArray = new ArrayImpl();
            Array lenArray = new ArrayImpl();
            for(int i = 0; i < groupCount; i++) {
                int off = result.beginOffset(i);
                posArray.appendEL(Integer.valueOf(off + 1));
                lenArray.appendEL(Integer.valueOf(result.endOffset(i) - off));
            }
            Struct struct = new StructImpl();
            struct.setEL("pos", posArray);
            struct.setEL("len", lenArray);
            return struct;
           
        }
        Array posArray = new ArrayImpl();
        Array lenArray = new ArrayImpl();
        posArray.appendEL(Constants.INTEGER_0);
        lenArray.appendEL(Constants.INTEGER_0);
       
        Struct struct = new StructImpl();
        struct.setEL("pos", posArray);
        struct.setEL("len", lenArray);
        return struct;
View Full Code Here

       
       
        Pattern pattern = getPattern(strPattern,compileOptions);
       
       
        Array rtn = new ArrayImpl();
        MatchResult result;
        while(matcher.contains(input, pattern)) {
          result = matcher.getMatch()
          rtn.appendEL(result.toString());
          /*
          System.out.println("Match: " + result.toString());
          System.out.println("Length: " + result.length());
          groups = result.groups();
          System.out.println("Groups: " + groups);
View Full Code Here

   * @param el Struct Object as XML Element
   * @return Struct Object
   * @throws ConverterException
   */
  private Array _deserializeArray(Element el) throws ConverterException {
    Array array=new ArrayImpl();
   
    NodeList list=el.getChildNodes();
    int len=list.getLength();
    for(int i=0;i<len;i++) {
      Node node=list.item(i);
      if(node instanceof Element)
        try {
          array.append(_deserialize((Element)node));
        } catch (PageException e) {
          throw toConverterException(e);
        }
     
    }
View Full Code Here

        sb.append(" ");
        array.appendEL(sb.toString());
    }
   
  public Struct validate(InputSource xml) throws XMLException {
    warnings=new ArrayImpl();
    errors=new ArrayImpl();
    fatals=new ArrayImpl();
   
    try {
            XMLReader parser = XMLUtil.createXMLReader("org.apache.xerces.parsers.SAXParser");
            parser.setContentHandler(this);
            parser.setErrorHandler(this);
View Full Code Here

      Object obj = data.get(inside, null);
      if(obj instanceof Array)  {
        ((Array)obj).appendEL(sct);
      }
      else if(obj instanceof FeedStruct){
        Array arr = new ArrayImpl();
        arr.appendEL(obj);
        arr.appendEL(sct);
        data.setEL(inside, arr);
      }
      else if(obj instanceof String){
        // wenn wert schon existiert wird castableArray in setContent erstellt
      }
      else {
        El el= decl.getDeclaration().get(path);
        if(el!=null && (el.getQuantity()==El.QUANTITY_0_N || el.getQuantity()==El.QUANTITY_1_N)){
          Array arr = new ArrayImpl();
          arr.appendEL(sct);
          data.setEL(inside, arr);
        }
        else data.setEL(inside, sct);
       
      }
View Full Code Here

          Array arr;
          if(Decision.isArray(obj)) {
            try {
              arr = Caster.toArray(obj);
            } catch (PageException e) {
              arr=new ArrayImpl();
            }
          }
          else {
            arr=railo.runtime.type.util.ListUtil.listToArrayRemoveEmpty(Caster.toString(obj,""), ',');
          }
View Full Code Here

   
  }

  private void queryAddColumn(QueryImpl query, Collection.Key column, int type) throws PageException {
    if(!query.containsKey(column)) {
      query.addColumn( column, new ArrayImpl(), type );
    }
  }
View Full Code Here

   

    // exceptions
    len = exceptions==null?0:exceptions.size();
   
        Array arrExceptions=new ArrayImpl();
        if(len>0) {
            Iterator<CatchBlock> it = exceptions.iterator();
            row=0;
            while(it.hasNext()) {
              arrExceptions.appendEL(it.next())
            }
     
        }

    // output log
View Full Code Here

TOP

Related Classes of railo.runtime.type.ArrayImpl

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.