Examples of Position


Examples of org.apache.lucene.util.Vint8.Position

  public Object extractCategoryTokenData(byte[] buffer, int offset, int length) {
    if (length == 0) {
      return null;
    }
    Integer i = Integer.valueOf(Vint8.decode(buffer, new Position(offset)));
    return i;
  }
View Full Code Here

Examples of org.apache.mesos.Log.Position

            EasyMock.eq((long) WRITE_TIMEOUT.getValue()),
            EasyMock.eq(WRITE_TIMEOUT.getUnit().getTimeUnit())));
  }

  private Position expectWrite(String content, long resultingPosition) throws Exception {
    Position position = makePosition(resultingPosition);
    expectWrite(content).andReturn(position);
    return position;
  }
View Full Code Here

Examples of org.apache.sis.internal.geoapi.temporal.Position

     * or just unspecified. This class assumes that a time of zero means "unspecified". This will be
     * revised after we implemented ISO 19108.</p>
     */
    static XMLGregorianCalendar toXML(final Instant instant) {
        if (instant != null) {
            final Position position = instant.getPosition();
            if (position != null) {
                final Context context = Context.current();
                try {
                    final XMLGregorianCalendar date = XmlUtilities.toXML(context, position.getDate());
                    if (date != null) {
                        XmlUtilities.trimTime(date, false);
                        return date;
                    }
                } catch (DatatypeConfigurationException e) {
View Full Code Here

Examples of org.apache.uima.annotator.regex.Position

                  .intValue();
            int endMatchGroup = annotationList[a].getEnd().getGroup().intValue();
            int endLocation = annotationList[a].getEnd().getLocation()
                  .intValue();

            Position begin = new Position_impl(beginMatchGroup, beginLocation);
            Position end = new Position_impl(endMatchGroup, endLocation);

            // create annotation object
            String id = annotationList[a].getId();
            String type = annotationList[a].getType();
            String validationClass = annotationList[a].getValidate();
View Full Code Here

Examples of org.apdplat.module.security.model.Position

         */
        @Override
        public void prepareForDelete(Integer[] ids){
            User loginUser=UserHolder.getCurrentLoginUser();
            for(int id :ids){
                Position position=getService().retrieve(Position.class, id);
                boolean canDel=true;
                //获取拥有等待删除的角色的所有用户
                List<User> users=position.getUsers();
                for(User user : users){
                    if(loginUser.getId()==user.getId()){
                        canDel=false;
                    }
                }
View Full Code Here

Examples of org.archfirst.bfoms.domain.account.brokerage.Position

   
    @Test
    public void testSerialization()
        throws JsonGenerationException, JsonMappingException, IOException {
       
        Position cashPosition = new Position();
        cashPosition.setCashPosition(ACCOUNT_ID, ACCOUNT_NAME, CASH_IN_ACCOUNT);

        Position instrumentPosition = new Position();
        instrumentPosition.setInstrumentPosition(
                ACCOUNT_ID, ACCOUNT_NAME, INS_SYMBOL, INS_NAME, INS_LAST_TRADE);
       
        Position lotPosition = new Position();
        lotPosition.setLotPosition(
                ACCOUNT_ID, ACCOUNT_NAME, INS_SYMBOL, INS_NAME, LOT_ID,
                LOT_CREATION_TIME, LOT_QUANTITY, INS_LAST_TRADE, LOT_PRICE_PAID);
       
        instrumentPosition.addChild(lotPosition);
        instrumentPosition.calculateInstrumentPosition();
View Full Code Here

Examples of org.brickred.socialauth.Position

      NodeList positions = root.getElementsByTagName("position");
      if (positions != null && positions.getLength() > 0) {
        LOG.debug("Positions count " + positions.getLength());
        positionsArr = new Position[positions.getLength()];
        for (int i = 0; i < positions.getLength(); i++) {
          Position positionnObj = new Position();
          Element positionEl = (Element) positions.item(i);
          String pid = XMLParseUtil.getElementData(positionEl, "id");
          if (pid != null) {
            positionnObj.setPositionId(pid);
          }
          String title = XMLParseUtil.getElementData(positionEl,
              "title");
          if (title != null) {
            positionnObj.setTitle(title);
          }
          String isCurrent = XMLParseUtil.getElementData(positionEl,
              "is-current");
          if (isCurrent != null) {
            positionnObj.setCurrentCompany(Boolean
                .valueOf(isCurrent));
          }
          NodeList sd = positionEl.getElementsByTagName("start-date");
          if (sd != null && sd.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) sd.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              positionnObj.setStartDate(comp);
            }

          }
          NodeList ed = positionEl.getElementsByTagName("end-date");
          if (ed != null && ed.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) ed.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              positionnObj.setEndDate(comp);
            }

          }

          NodeList companyNodes = positionEl
              .getElementsByTagName("company");
          if (companyNodes != null && companyNodes.getLength() > 0) {
            Element company = (Element) companyNodes.item(0);
            String compid = XMLParseUtil.getElementData(company,
                "id");
            if (compid != null) {
              positionnObj.setCompanyId(compid);
            }
            String compName = XMLParseUtil.getElementData(company,
                "name");
            if (compName != null) {
              positionnObj.setCompanyName(compName);
            }
            String industry = XMLParseUtil.getElementData(company,
                "industry");
            if (industry != null) {
              positionnObj.setIndustry(industry);
            }
            String type = XMLParseUtil.getElementData(company,
                "type");
            if (type != null) {
              positionnObj.setCompanyType(type);
            }
          }
          positionsArr[i] = positionnObj;
        }
      }
View Full Code Here

Examples of org.contikios.cooja.interfaces.Position

    for (final Mote selectedMote : selectedMotes) {
      if (selectedMote.getInterfaces().getRadio() == null) {
        continue;
      }
      final Position sPos = selectedMote.getInterfaces().getPosition();

      /* Paint transmission and interference range for selected mote */
      Position motePos = selectedMote.getInterfaces().getPosition();

      Point pixelCoord = visualizer.transformPositionToPixel(motePos);
      int x = pixelCoord.x;
      int y = pixelCoord.y;

View Full Code Here

Examples of org.drools.definition.type.Position

                    // as these could be set in any order, initialise first, to allow setting later.
                    orderedFields.add( null );
                }

                for ( Field fld : fields ) {
                    Position pos = fld.getAnnotation( Position.class );
                    if ( pos != null ) {
                        FieldDefinition fldDef = new FieldDefinition( fld.getName(),
                                                                      fld.getType().getName() );
                        fldDef.setIndex( pos.value() );
                        orderedFields.set( pos.value(),
                                           fldDef );
                    }
                }
                for ( FieldDefinition fld : orderedFields ) {
                    if ( fld != null ) {
View Full Code Here

Examples of org.eclim.util.file.Position

        AbstractPyRefactoring.getPyRefactoring();
      Map<Tuple<String,File>, HashSet<ASTEntry>> refs =
        pyRefactoring.findAllOccurrences(request);
      for (Tuple<String,File> tuple : refs.keySet()){
        for (ASTEntry entry : refs.get(tuple)){
          Position position = Position.fromLineColumn(
            tuple.o2.toString().replace('\\', '/'),
            entry.getName(),
            entry.node.beginLine,
            entry.node.beginColumn);
          if (!results.contains(position)){
            results.add(position);
          }
        }
      }

    // find declaration
    }else{
      IPyRefactoring pyRefactoring = AbstractPyRefactoring.getPyRefactoring();
      ItemPointer[] defs = pyRefactoring.findDefinition(request);

      for (ItemPointer item : defs){
        if (item.file == null || item.file.toString().endsWith(".so")){
          continue;
        }
        Position position = Position.fromLineColumn(
          item.file.toString().replace('\\', '/'),
          item.definition.value,
          item.start.line + 1,
          item.start.column + 1);
        if (!results.contains(position)){
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.