Package com.esri.gpt.framework.resource.api

Examples of com.esri.gpt.framework.resource.api.Native


*/
private Native queryNative(Connection con) throws SQLException {
  final String content = queryContent(con);
  final String sourceUri = querySourceUri(con);
  final Date updateDate = queryUpdateDate(con);
  return new Native() {

      @Override
      public SourceUri getSourceUri() {
        return new StringUri(sourceUri);
      }
View Full Code Here


    };
    // create new query builder specific for the repository
    QueryBuilder queryBuilder = repository.newQueryBuilder(iterationContext);
    // get native resource; this may throw exception(s) stored later in the
    // placeholder
    Native nativeResource = queryBuilder.getNativeResource();
    // assure there are no exceptions; if there are any, throw the first one
    if (exceptions.size() > 0) {
      throw exceptions.get(0);
    }
    return nativeResource;
View Full Code Here

      HrAssertUrlRequest assertUrlRequest = new HrAssertUrlRequest(context, record.getHostUrl());
      assertUrlRequest.executeAssert();
    }

    // create native resource
    Native nativeResource = null;

    // check if either host URL or title has changed
    if (hostUrlChanged || titleChanged || (findableChanged && record.getFindable())) {
      record.setUpdateDate(new Date());
      // if hot URL or title has changed than proceed with generation of the
      // native resource
      String title = "";
      // First, try to create native resource from the response
      nativeResource = createNativeResource(record);
      if (nativeResource == null) {
        // if no native resource available, create an artificial one based on
        //the information (host URL & title) from the repository.
        nativeResource = record.generateNativeResource();
        // get title
        title = record.getName();
        ProtocolInvoker.setLockTitle(record.getProtocol(), false);
      } else {
        // if the native resource is available, make sure it's a valid metadata resource
        // prepare record for publication; it will validate schema
        PublicationRequest pubReq = new PublicationRequest(context, user, nativeResource.getContent());
        Schema schema = pubReq.prepareForPublication();
        boolean lockTitle = false;
        if (record.getName().length() == 0) {
          title = schema.getMeaning().getTitle();
        } else {
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.resource.api.Native

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.