Examples of CURIE


Examples of org.wikier.trioo.jtrioo.rdf.CURIE

   *
   * @param cls class
   * @return CURIE representing the datatype (null when not supported)
   */
  public static CURIE getDataType(Class<?> cls) {
    if (cls.isAssignableFrom(Byte.class))     return new CURIE("xsd:byte");
    if (cls.isAssignableFrom(Short.class))     return new CURIE("xsd:int");
    if (cls.isAssignableFrom(Integer.class))   return new CURIE("xsd:int");
    if (cls.isAssignableFrom(Long.class))     return new CURIE("xsd:long");
    if (cls.isAssignableFrom(Float.class))     return new CURIE("xsd:float");
    if (cls.isAssignableFrom(Double.class))   return new CURIE("xsd:double");
    if (cls.isAssignableFrom(Character.class))   return new CURIE("xsd:string");
    if (cls.isAssignableFrom(String.class))    return new CURIE("xsd:string");
    if (cls.isAssignableFrom(Date.class))    return new CURIE("xsd:date");
    return null;
  }
View Full Code Here

Examples of org.wikier.trioo.jtrioo.rdf.CURIE

        String ns = URIUtils.getNamespace(node.toString());
        String prefix = NamespacesManager.getInstance().getPrefix(ns);
        if (prefix == null) {
          throw new MappingNotFoundException("namespace " + ns);
        }
        CURIE curie = new CURIE(prefix, URIUtils.getReference(node.toString()));
        metaResource.addRdfType(curie);
      }
    }
    rs = null; //FIXME: how a ResultSet can be closed?
    Class cls = this.session.getAssociatedClass(metaResource);
View Full Code Here

Examples of org.wikier.trioo.jtrioo.rdf.CURIE

  public void addRdfType(CURIE curie) {
    this.rdftypes.add(curie);
  }
 
  public void addRdfType(String curie) {
    this.addRdfType(new CURIE(curie));
  }
View Full Code Here

Examples of org.wikier.trioo.jtrioo.rdf.CURIE

    this.preprocessTerm(o);
    this.triplepatterns.add(new TriplePattern(s,p,o));
  }
 
  private void preprocessTerm(RDFTerm term) {
    CURIE curie = null;
    if (term instanceof CURIE) {
      curie = (CURIE)term;
     
    }
    if (term instanceof Property) {
      Property property = (Property)term;
      curie = property.getType();
    }
    if (term instanceof Literal) {
      Literal literal = (Literal)term;
      curie = literal.getDatatype();
    }
    //FIXME: more?
   
    if (curie != null) {
      String label = curie.getPrefix();
      String namespace = namespaces.getMapping(label);
      Prefix prefix = new Prefix(label, namespace);
      this.prefixes.add(prefix);
    }
  }
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.