Package org.mmisw.orrclient.gwt.client.rpc

Examples of org.mmisw.orrclient.gwt.client.rpc.EntityInfo


          boolean versionExplicit = uri.indexOf("version=") >= 0;
          dispatchOntologyPanel(registeredOntologyInfo, versionExplicit);
          return;
        }
       
        EntityInfo entityInfo = resolveUriResult.getEntityInfo();
        if ( entityInfo != null ) {
          dispatchEntityPanel(entityInfo);
          return;
        }
       
View Full Code Here


    }
   
    boolean ok = false;
   
    if ( ! result.toLowerCase().startsWith("error:") ) {
      EntityInfo entityInfo = new EntityInfo();
     
      String[] lines = result.split("\n|\r\n|\n");
      for (String string : lines) {
        String[] toks = string.split(",", 2);
        if ( toks.length != 2 || ("prop".equals(toks[0]) && "value".equals(toks[1])) ) {
          continue;
        }
        String prop = toks[0];
        String value = toks.length > 1 ? toks[1] : null;
       
        Resource propResource = ResourceFactory.createResource(prop);
       
        PropValue pv = new PropValue();
        pv.setPropName(propResource.getLocalName());
        pv.setPropUri(prop);
       
        boolean valueIsUri = false;
        try {
          URI jUri = new URI(value)// just check to see whether is a URI
          valueIsUri = jUri.isAbsolute();
        }
        catch (URISyntaxException e) {
          // ignore.
        }
        if ( valueIsUri ) {
          pv.setValueUri(value);
          Resource objResource = ResourceFactory.createResource(value);
          pv.setValueName(objResource.getLocalName());
        }
        else {
          pv.setValueName(value);
        }
       
        entityInfo.getProps().add(pv);
      }
     
      int size = entityInfo.getProps().size();
      if ( size > 0 ) {
        ok = true;
        entityInfo.setUri(uri);
        if ( log.isDebugEnabled() ) {
          log.debug("Added " +size+ " property/value pairs to " +uri);
        }
        resolveUriResult.setEntityInfo(entityInfo);
      }
View Full Code Here

      String entityUri = ind.getURI();
      if ( entityUri == null ) {
        continue;
      }
     
      EntityInfo entityInfo = new EntityInfo();
      entityInfo.setUri(entityUri);

      String localName = _getLocalName(entityUri, ontologyUri);
      entityInfo.setLocalName(localName);

      _addProps(entityUri, entityInfo, ontModel, dtProps);
      entities.add(entityInfo);
    }
   
View Full Code Here

        ok = false;
      }
    }
   
    if ( ok ) {
      EntityInfo entityInfo = new EntityInfo();
     
      for (String[] toks : lines) {
        if ( toks.length != 2 ) {
          continue;
        }
        String prop = _removeBrackets(toks[0]);
        String value = _removeBrackets(toks[1]);
       
        if ("prop".equals(prop) && "value".equals(value)) {
          continue;
        }
       
        Resource propResource = ResourceFactory.createResource(prop);
       
        PropValue pv = new PropValue();
        pv.setPropName(propResource.getLocalName());
        pv.setPropUri(prop);
       
        if ( _isAbsoluteUri(value) ) {
          pv.setValueUri(value);
          Resource objResource = ResourceFactory.createResource(value);
          pv.setValueName(objResource.getLocalName());
        }
        else {
          pv.setValueName(value);
        }
       
        entityInfo.getProps().add(pv);
      }
     
      int size = entityInfo.getProps().size();
      if ( size > 0 ) {
        entityInfo.setUri(uri);
        if ( log.isDebugEnabled() ) {
          log.debug("Added " +size+ " property/value pairs to " +uri);
        }
        resolveUriResult.setEntityInfo(entityInfo);
      }
View Full Code Here

TOP

Related Classes of org.mmisw.orrclient.gwt.client.rpc.EntityInfo

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.