Examples of Structure


Examples of ca.uhn.fhir.model.dstu.resource.Profile.Structure

      }
    });

    // Scan for children
    retVal.setName(getName());
    Structure struct = retVal.addStructure();
    LinkedList<String> path = new LinkedList<String>();

    StructureElement element = struct.addElement();
    element.getDefinition().setMin(1);
    element.getDefinition().setMax("1");

    fillProfile(struct, element, def, path, null);
View Full Code Here

Examples of ca.uhn.hl7v2.model.Structure

                log.debug("Parsing segment {}", name);

                messageIter.setDirection(name);
                FilterIterator.Predicate byDirection = new FilterIterator.Predicate() {
                    public boolean evaluate(Object obj) {
                        Structure s = (Structure) obj;
                        log.debug("PipeParser iterating message in direction {} at {} ", name, s.getName());
                        return s.getName().matches(name + "\\d*");
                    }
                };
                FilterIterator dirIter = new FilterIterator(segmentIter, byDirection);
                if (dirIter.hasNext()) {
                    parse((Segment) dirIter.next(), segments[i], getEncodingChars(string));
View Full Code Here

Examples of com.dotmarketing.portlets.structure.model.Structure

    }
    if (RegEX.contains(url, mastRegEx)) {
      boolean ADMIN_MODE = (session.getAttribute(com.dotmarketing.util.WebKeys.ADMIN_MODE_SESSION) != null);
      boolean EDIT_MODE = ((session.getAttribute(com.dotmarketing.util.WebKeys.EDIT_MODE_SESSION) != null) && ADMIN_MODE);

      Structure structure = null;
      User user = null;
      try {
        user = wuserAPI.getLoggedInUser(request);
      } catch (Exception e1) {
        Logger.error(URLMapFilter.class, e1.getMessage(), e1);
      }
 
      List<ContentletSearch> cons = null;
      Collections.sort(patternsCache, new Comparator<PatternCache>(){
        public int compare(PatternCache o1, PatternCache o2) {
          String regex1 = o1.getRegEx();
          String regex2 = o2.getRegEx();
          if(!regex1.endsWith("/")){
            regex1+="/";
          }
          if(!regex2.endsWith("/")){
            regex2+="/";
          }
       
          int regExLength1 = getSlashCount(regex1);
            int regExLength2 = getSlashCount(regex2);
          if(regExLength1 < regExLength2){
                return 1;
            }else if(regExLength1 > regExLength2){
                return -1;
              }else{
                return 0
              }
        }
      });
      for (PatternCache pc : patternsCache) {
        List<RegExMatch> matches = RegEX.findForUrlMap(url, pc.getRegEx());
        if (matches != null && matches.size() > 0) {
          query = new StringBuilder();
          List<RegExMatch> groups = matches.get(0).getGroups();
          List<String> fieldMatches = pc.getFieldMatches();
          structure = StructureCache.getStructureByInode(pc.getStructureInode());
          List<Field> fields = FieldsCache.getFieldsByStructureInode(structure.getInode());
          query.append("+structureName:").append(structure.getVelocityVarName()).append(" +deleted:false ");
          if (EDIT_MODE || ADMIN_MODE) {
            query.append("+working:true ");
          } else {
            query.append("+live:true ");
          }

          // Set Host Stuff
          boolean hasHostField = false;
          Boolean hostIsRequired = false;
          for (Field field : fields) {
            if (field.getFieldType().equals(Field.FieldType.HOST_OR_FOLDER.toString())) {
              hasHostField = true;
              if (field.isRequired()) {
                hostIsRequired = true;
              }
              break;
            }
          }
          if (hasHostField) {
            if (host != null) {
              //if (hostIsRequired) {
              //query.append("+conhost:" + host.getIdentifier() + " ");
              //} else {
              try {
                query.append("+(conhost:").append(host.getIdentifier()).append(" ")
                     .append("conhost:").append(whostAPI.findSystemHost(wuserAPI.getSystemUser(), true).getIdentifier()).append(") ");
              } catch (Exception e) {
                Logger.error(URLMapFilter.class, e.getMessage()
                    + " : Unable to build host in query : ", e);
              }
              //}
            }
          }

          // build fields
          int counter = 0;
          for (RegExMatch regExMatch : groups) {
            String value = regExMatch.getMatch();
            if (value.endsWith("/")) {
              value = value.substring(0, value.length() - 1);
            }
            query.append("+").append(structure.getVelocityVarName()).append(".").append(fieldMatches.get(counter)).append(":")
                .append(value).append(" ");
            counter++;
          }
         
          try {
              long sessionLang=WebAPILocator.getLanguageWebAPI().getLanguage(request).getId();
              long defaultLang=APILocator.getLanguageAPI().getDefaultLanguage().getId();
             
              boolean checkIndex=false;
           
                        if(request.getParameter("language_id")==null && Config.getBooleanProperty("DEFAULT_CONTENT_TO_DEFAULT_LANGUAGE",false)) {
                            // consider default language. respecting language_id in parameters
                            query.append(" +(languageId:").append(defaultLang).append(" languageId:").append(sessionLang).append(") ");
                            checkIndex=true;
                        }
                        else {
                            // respect session language
                            query.append(" +languageId:").append(sessionLang).append(" ");
                        }
             
            cons = conAPI.searchIndex(query.toString(), 2, 0, (hostIsRequired?"conhost, modDate": "modDate"), user, true);
            int idx = 0;
            if(checkIndex && cons.size()==2) {
                // prefer session setting
                Contentlet second=conAPI.find(cons.get(1).getInode(), user, true);
                if(second.getLanguageId()==sessionLang)
                    idx=1;
            }
            ContentletSearch c = cons.get(idx);
            session.setAttribute(com.dotmarketing.util.WebKeys.HTMLPAGE_LANGUAGE,String.valueOf(conAPI.find(c.getInode(), user, true).getLanguageId()));
            request.setAttribute(WebKeys.WIKI_CONTENTLET, c.getIdentifier());
            request.setAttribute(WebKeys.WIKI_CONTENTLET_INODE, c.getInode());
            request.setAttribute(WebKeys.CLICKSTREAM_IDENTIFIER_OVERRIDE, c.getIdentifier());
            request.setAttribute(WebKeys.WIKI_CONTENTLET_URL, url);
            String[] x = url.split("/");
            for(int i=0;i<x.length;i++){
              if(UtilMethods.isSet(x[i])){
                request.setAttribute("URL_ARG" + i, x[i]);
              }
            }
           
            break;
          } catch (DotDataException e) {
            Logger.warn(this, "DotDataException", e);
          } catch (DotSecurityException e) {
            Logger.warn(this, "DotSecurityException", e);
          } catch(java.lang.IndexOutOfBoundsException iob){
            Logger.warn(this, "No urlmap contentlent found uri:" + url + " query:" + query.toString());
          }catch(Exception e){
            Logger.warn(this, "No index?" + e.getMessage());
          }
        }
      }
     
   
      if (structure != null && UtilMethods.isSet(structure.getDetailPage())) {
        Identifier ident;
        try {
          ident = APILocator.getIdentifierAPI().find(structure.getDetailPage());
          if(ident ==null || ! UtilMethods.isSet(ident.getInode())){
            throw new DotRuntimeException("No valid detail page for structure '" + structure.getName() + "'. Looking for detail page id=" + structure.getDetailPage());
          }

         
          if((cons != null && cons.size() > 0) || !urlFallthrough){
           
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Structure

        Map<String, Map<String, Ipo>> constraintsIpos = new HashMap<String, Map<String, Ipo>>();
        Pointer pActions = (Pointer) objectStructure.getFieldValue("action");
        if (pActions.isNotNull()) {
            List<Structure> actions = pActions.fetchData();
            for (Structure action : actions) {
                Structure chanbase = (Structure) action.getFieldValue("chanbase");
                List<Structure> actionChannels = chanbase.evaluateListBase();
                for (Structure actionChannel : actionChannels) {
                    Map<String, Ipo> ipos = new HashMap<String, Ipo>();
                    Structure constChannels = (Structure) actionChannel.getFieldValue("constraintChannels");
                    List<Structure> constraintChannels = constChannels.evaluateListBase();
                    for (Structure constraintChannel : constraintChannels) {
                        Pointer pIpo = (Pointer) constraintChannel.getFieldValue("ipo");
                        if (pIpo.isNotNull()) {
                            String constraintName = constraintChannel.getFieldValue("name").toString();
                            Ipo ipo = animationHelper.fromIpoStructure(pIpo.fetchData().get(0), blenderContext);
View Full Code Here

Examples of com.sun.jna.Structure

            if(ppc) {
                // on ppc32 structs never return in registers
                return objc_msgSend_stret_Pair;
            }
            // on i386 structs with sizeof exactly equal to 1, 2, 4, or 8 return in registers
            Structure prototype = (Structure) returnTypeForThisCall.newInstance();
            return prototype.size() < stretCutoff ? objc_msgSend_Pair : objc_msgSend_stret_Pair;
        }
        catch(InstantiationException e) {
            throw new RococoaException(e);
        }
        catch(IllegalAccessException e) {
View Full Code Here

Examples of ds.pjftp.structure.Structure

            session.replyWithSpace(501, "Syntax error.");
            return;
        }

        final char type = param.charAt(0);
        final Structure structure = Structures.get(type);

        if (structure == null) {
            session.replyWithSpace(504, "Not implemented for this command.");
            return;
        }
View Full Code Here

Examples of edu.vt.rt.hyflow.core.dir.ballistic.strucure.Structure

    nodeID = Integer.parseInt(System.getProperty("MyId").trim());
   
   
    int[][] original_matrix = CreateTabl(number_of_node)
    List<List<Integer>> leaders = constructMaxSet(CreateTabl(number_of_node));
    struc = new Structure(leaders, original_matrix);
   
    Aleph.register("Ballistic Directory", this);
    if(DEBUG)
      Aleph.debug(this.toString());
   
View Full Code Here

Examples of it.hotel.model.structure.Structure

      map.put("structures", structuresCollection);
    }
    if(page==1){
      CriteriaDTO criteria =(CriteriaDTO)req.getSession().getAttribute("dto");
      createBookingFromCriteria(booking, criteria);
      Structure structure = (Structure) structureManager.get(booking.getStructure().getId());
      map.put("result", bookingManager.getSolutionsForStructureFromCriteria(criteria,booking.getStructure(),booking.getBeginDate(),booking.getFinishDate()));
      map.put("structure", structure);
     
    }
    if(page==2){
View Full Code Here

Examples of jason.asSyntax.Structure

    this.operatorInstances = new Hashtable<String, OperatorImpl>();
    this.operatorTemplates = new Hashtable<String, OperatorImpl>();
  }
 
  public Operator createOperatorTemplate(String signature, String[] preconds, String[] effects) {
    Structure oper = Structure.parse(signature);
    ArrayList<Proposition> precondProps = new ArrayList<Proposition>(preconds.length);
    ArrayList<Proposition> effectProps = new ArrayList<Proposition>(effects.length);
   
    for (int i = 0; i < preconds.length; i++) {
      PropositionImpl precond = new PropositionImpl(preconds[i]);
View Full Code Here

Examples of org.apache.cxf.jaxrs.resources.sdo.Structure

        Service s = new JAXRSServiceImpl(Collections.singletonList(c2), true);
        DataBinding binding = new SDODataBinding();
        binding.initialize(s);
        DataBindingProvider p = new DataBindingProvider(binding);
        ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
        Structure struct = (Structure)p.readFrom((Class)Structure.class, Structure.class,
                                      new Annotation[0], MediaType.APPLICATION_XML_TYPE,
                                      new MetadataMap<String, String>(), is);
        assertEquals("sdo", struct.getText());
        assertEquals(123.5, struct.getDbl(), 0.01);
        assertEquals(3, struct.getInt());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.