Examples of Identification


Examples of org.apache.servicemix.jbi.deployment.Identification

        // lets force the JBI container to be constructed first
        Descriptor root = (Descriptor) context.getBeansOfType(Descriptor.class).values().iterator().next();
        assertNotNull("JBI Container not found in spring!", root);

        SharedLibrary sl = root.getSharedLibrary();
        Identification identification = sl.getIdentification();
        assertEquals("getName", "TestSharedLibrary", identification.getName());
        assertEquals("getDescription", "This is a test shared library.", identification.getDescription());
       
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.deployment.Identification

        assertEquals("getDescription", "foo", component.getDescription());

        assertArrayEquals("getSharedLibraries", new SharedLibraryList[] {new SharedLibraryList("slib1")}, component.getSharedLibraries());

        Identification identification = component.getIdentification();
        assertNotNull("identification is null", identification);
        assertEquals("getName", "example-engine-1", identification.getName());
        assertEquals("getDescription", "An example service engine", identification.getDescription());

        InstallationDescriptorExtension descriptorExtension = component.getDescriptorExtension();
        assertNotNull("descriptorExtension is null", descriptorExtension);

        DocumentFragment fragment = descriptorExtension.getDescriptorExtension();
View Full Code Here

Examples of org.apache.servicemix.jbi.deployment.Identification

        assertNotNull("JBI Container not found in spring!", root);

        ServiceAssembly serviceAssembly = root.getServiceAssembly();
        assertNotNull("serviceAssembly is null", serviceAssembly);

        Identification identification = serviceAssembly.getIdentification();
        assertNotNull("identification is null", identification);
        assertEquals("getName", "ServiceAssembly_041207153211-0800_saId", identification.getName());
        assertEquals("getDescription", "Description of Service Assembly : ServiceAssembly", identification.getDescription());

        ServiceUnit[] serviceUnits = serviceAssembly.getServiceUnits();
        assertNotNull("serviceUnits are null", serviceUnits);
        assertEquals("serviceUnits size", 4, serviceUnits.length);
View Full Code Here

Examples of org.geotools.imageio.Identification

                AxisType axisType = zAxis.getAxisType();

                String v_crsName = "Unknown";
                String v_datumName = "Unknown";
                String v_datumType = null;
                v_datumName = new Identification("Mean Sea Level", null, null, "EPSG:5100").getName();

                if (axisType == AxisType.RadialAzimuth || axisType == AxisType.GeoZ || axisType == AxisType.RadialElevation)
                    v_datumType = "geoidal";
                else if (axisType == AxisType.Height) {
                    if (!zAxis.getShortName().equalsIgnoreCase("height")) {
                        v_datumType = "depth";
                        v_crsName = new Identification("mean sea level depth", null, null, "EPSG:5715").getName();
                    } else {
                        v_datumType = "geoidal";
                        v_crsName = new Identification("mean sea level height", null, null, "EPSG:5714").getName();
                    }
                } else if (axisType == AxisType.Pressure)
                    v_datumType = "barometric";
                else
                    v_datumType = "other_surface";
View Full Code Here

Examples of org.geotools.imageio.metadataold.Identification

  protected void setCoordinateReferenceSystemElement(SpatioTemporalImageReader reader) {
        getAttributesMap(reader);
        init(reader);
        CoordinateReferenceSystem crs = getCRS(SpatioTemporalMetadataFormat.PROJECTED);
        crs.setBaseCRS(new Identification("WGS 84", null, null,"EPSG:4326"));
       
        switch (hdf4_type) {
        case TeraScan:
           setTerascanCRS(crs);
           break;
        case APS:
          setAPSCRS(crs);
            break;
        }

        // //
        //
        // Setting Temporal CRS
        //
        // //
        setHasTemporalCRS(true);
        final TemporalCRS tCRS = getTemporalCRS();
        tCRS.setDatum(new Identification("ISO8601", null, null, null));
       
        String startTime = null;
      String endTime = null;
      Date startDate = null;
    Date endDate = null;
    switch (hdf4_type){
      case APS:
        startTime = attributesMap.get("timeStart");
        endTime = attributesMap.get("timeEnd");
        startDate = HDF4Utilities.getDateTime(startTime, HDF4Utilities.APS_DATETIME_FORMAT);
        endDate = HDF4Utilities.getDateTime(endTime, HDF4Utilities.APS_DATETIME_FORMAT);
        break;
      case TeraScan:
        final String startDates = attributesMap.get("data_start_date");
        final String startTimes = attributesMap.get("data_start_time");
        final String endDates = attributesMap.get("data_end_date");
        final String endTimes = attributesMap.get("data_end_time");
        startTime = new StringBuilder(startDates).append(" ").append(startTimes).toString();
        endTime = new StringBuilder(endDates).append(" ").append(endTimes).toString();
        startDate = HDF4Utilities.getDateTime(startTime, HDF4Utilities.TERASCAN_DATETIME_FORMAT);
        endDate = HDF4Utilities.getDateTime(endTime, HDF4Utilities.TERASCAN_DATETIME_FORMAT);
        break;
      }
    if (startDate != null)
      startInstant = new DefaultInstant(new DefaultPosition(startDate));
    if (endDate != null
      endInstant = new DefaultInstant(new DefaultPosition(endDate));

    final String timeOrigin = startInstant.getPosition().getDateTime().toString();
    tCRS.addAxis(new Identification("TIME"), "future", "hours since "+ timeOrigin, null);
        tCRS.addOrigin(timeOrigin);
    }
View Full Code Here

Examples of org.opengis.metadata.identification.Identification

     *
     * @param isNilExpected {@code true} if the identification info is expected to be a {@link NilObject} instance.
     * @param metadata The metadata to verify.
     */
    private static void verify(final boolean isNilExpected, final DefaultMetadata metadata) {
        final Identification identification = getSingleton(metadata.getIdentificationInfo());
        assertEquals("NilObject", isNilExpected, identification instanceof NilObject);
        assertInstanceOf("Identification", IdentifiedObject.class, identification);
        final XLink xlink = ((IdentifiedObject) identification).getIdentifierMap().getSpecialized(IdentifierSpace.XLINK);
        assertEquals("xlink:href", "http://test.net", xlink.getHRef().toString());
    }
View Full Code Here

Examples of org.persvr.data.Identification

      if (object.containsKey("$ref")) {
       
        return Identification.idForRelativeString(path, (String) object.get("$ref"));
      }
      if (object.containsKey("id")) {
        Identification currentId = Identification.idForRelativeString(path, object.remove("id").toString());

        if (currentId.source instanceof ClientData) // TODO: Surely we can do this more consistently
          target = Client.getCurrentObjectResponse().getConnection().clientSideObject(currentId.toString(),createInitialObject(object));
        else {
          if (currentId instanceof ObjectId){
            if(mustMatchId){
              if(targetId != currentId){
                throw new RuntimeException("id does not match location");
              }
            }
            else {
              targetId = (ObjectId) currentId;
            }
           
          }
          else {
            target = (Persistable) currentId.getTarget();
            if(mustMatchId && target.getId() != targetId){
              throw new RuntimeException("id does not match location");
            }
          }
        }
View Full Code Here

Examples of org.persvr.data.Identification

          Persistable object = null;
              //Id requestedId = new Id(requestedObject); // removes the leading underscore
              //requestedId.source = sourceURL;
          String field = null;
              Object value = null;
            Identification id = Identification.idForString(requestedPath);
            value = getClientSideObject(requestedPath);
            if(value != null){
              object = (Persistable) value;
            }
            else{
              if (id instanceof ObjectId || id instanceof JsonPath){
                if(id instanceof ObjectId){
                  value = put ? ((ObjectId)id).getOrCreateTarget() : ((ObjectId)id).getTarget(); // We can't use getOrCreateTarget or else it would create objects on GETs
                }
                else {
                  value = ((Identification<Object>)id).getTarget();
                }
                if (value instanceof Persistable){
                  object = (Persistable)value;
                }
              }
              else {
                object = ((ObjectPath)id).getSecondToLastTarget();
                field = ((ObjectPath)id).getLastPath().toString();
                value = id.getTarget();
              }
            }
            setRequestedPath(requestedPath,id);
         
View Full Code Here

Examples of org.persvr.data.Identification

         * source = DataSourceManager.getSource(sourceName); if (source ==
         * null) source = AliasIds.getAliasHandler(sourceName); } else
         * source = null;
         */
        String method = request.getMethod().toUpperCase();
        Identification targetId = Identification.idForString(path);

        if (log.isDebugEnabled()) {
          log.debug("Identification targetId:" + targetId);
          log.debug("Request Method: " + method);
        }

        reason = null;
        if ("GET".equals(method) || "POST".equals(method)) {
          // allow the HTTP method to be defined with a parameter
          String explicitMethod = getHeader(request, "method");
          if (explicitMethod != null)
            method = explicitMethod;
          else if ("GET".equals(method))
            // if there is not explicit method, than we can assume cookie authorization is allowed
            requestHelper.authorizeCookieAuthentication();
        }
        try {
          if (targetId instanceof ObjectNotFoundId ||
            (targetId.getSource() instanceof LocalDataSource && ((LocalDataSource) targetId.getSource()).passThrough()) ||
            ("GET".equals(method) && !objectExistsForId(targetId))) {
            if ("PUT".equals(method)) {
              if (UserSecurity.hasPermission(SystemPermission.javaScriptCoding)) {
                // if the user has permission they can also update files with PUT
                File targetFile = new File(((HttpServletRequest) request).getRealPath(path));
View Full Code Here

Examples of org.persvr.data.Identification

          && "id".equals(expression.getLastChild().getString())) {
      name = expression.getFirstChild().getLastChild().getString();
      sql.append("field='" + makeStringSQLSafe(name) + "'");
      if (valueNode.getType() != Token.STRING || (conditionType != Token.EQ && conditionType != Token.SHEQ))
        throw new QueryCantBeHandled("The id must be a string");
      Identification id = Identification.idForString(valueNode.getString());
      if (!(id instanceof ObjectId)){
        throw new QueryCantBeHandled("The id must be an object id");
      }
      if(!(id.source instanceof DynaObjectDBSource)){
        throw new QueryCantBeHandled("The id must be an object id of the object db");
      }
      sql.append(" AND value_type=" + OBJECT_TYPE + " AND value=" + ((DynaObjectDBSource)id.source).convertId(id.subObjectId));
      return sql.toString();
     
    }
    if (expression.getType() == Token.GETPROP && expression.getFirstChild().getType() == Token.THIS
        && "id".equals(expression.getLastChild().getString())) {
      Identification id = Identification.idForString(valueNode.getString());
      if (!(id instanceof ObjectId)){
        throw new QueryCantBeHandled("The id must be an object id");
      }
      if(!(id.source instanceof DynaObjectDBSource)){
        throw new QueryCantBeHandled("The id must be an object id of the object db");
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.