Package com.dooapp.gaedo.blueprints

Examples of com.dooapp.gaedo.blueprints.Kind


    try {
      if (Literals.containsKey(valueClass)) {
        // some literals aren't so ... literal, as they can accept
        // incoming connections (like classes)
        LiteralTransformer literalTransformer = Literals.get(valueClass);
        Kind kind = literalTransformer.getKind();
        returned = database.addVertex(kind.getURIFor(vertexId, valueClass));
        if (Kind.literal.equals(kind)) {
          returned.setProperty(Properties.type.name(), TypeUtils.getType(valueClass));
        }
      } else {
        if (repository.containsKey(valueClass)) {
View Full Code Here


   * @param value
   * @see com.dooapp.gaedo.blueprints.AbstractBluePrintsBackedFinderService#setValue(com.tinkerpop.blueprints.pgm.Vertex, java.lang.Object)
   */
  @Override
  protected void setValue(Vertex vertex, Object value) {
    Kind vertexKind = GraphUtils.getKindOf(vertex);
    switch(vertexKind) {
    case literal:
      vertex.setProperty(Properties.value.name(), value);
      break;
    case uri:
View Full Code Here

    }
  }

  @Override
  protected Object getValue(Vertex vertex) {
    Kind vertexKind = GraphUtils.getKindOf(vertex);
    switch(vertexKind) {
    case literal:
      return vertex.getProperty(Properties.value.name());
    case bnode:
    case uri:
      return vertexKind.extractValueOf(vertex.getId().toString());
    default:
      return null;
    }
  }
View Full Code Here

    Iterator<Vertex> matching = matchingIterable.iterator();
    if (matching.hasNext()) {
      while (matching.hasNext()) {
        Vertex vertex = matching.next();
        String vertexTypeName = null;
        Kind vertexKind = null;
        String vertexId = null;
        try {
          /// BEWARE : order is signifiant here : read id then kind then type for catch clauses to work correctly
          vertexId = matcher.getIdOf(vertex);
          vertexKind = matcher.getKindOf(vertex);
View Full Code Here

   * @return
   * @see com.dooapp.gaedo.blueprints.strategies.GraphMappingStrategy#getEffectiveType(com.tinkerpop.blueprints.pgm.Vertex)
   */
  @Override
  public String getEffectiveType(Vertex vertex) {
    Kind kind = Kind.valueOf(vertex.getProperty(Properties.kind.name()).toString());
    switch (kind) {
    case literal:
      Object typeProperty = vertex.getProperty(Properties.type.name());
      if (typeProperty == null)
        return STRING_CLASS;
View Full Code Here

   * @return
   * @see com.dooapp.gaedo.blueprints.strategies.GraphMappingStrategy#getEffectiveType(com.tinkerpop.blueprints.pgm.Vertex)
   */
  @Override
  public String getEffectiveType(Vertex vertex) {
    Kind kind = Kind.valueOf(vertex.getProperty(Properties.kind.name()).toString());
    switch (kind) {
    case literal:
      Object typeProperty = vertex.getProperty(Properties.type.name());
      if (typeProperty == null)
        return STRING_CLASS;
View Full Code Here

   * @return
   * @see com.dooapp.gaedo.blueprints.strategies.GraphMappingStrategy#getEffectiveType(com.tinkerpop.blueprints.pgm.Vertex)
   */
  @Override
  public String getEffectiveType(Vertex vertex) {
    Kind kind = Kind.valueOf(vertex.getProperty(Properties.kind.name()).toString());
    switch (kind) {
    case literal:
      Object typeProperty = vertex.getProperty(Properties.type.name());
      if (typeProperty == null)
        return STRING_CLASS;
View Full Code Here

   * @return
   * @see com.dooapp.gaedo.blueprints.strategies.GraphMappingStrategy#getEffectiveType(com.tinkerpop.blueprints.pgm.Vertex)
   */
  @Override
  public String getEffectiveType(Vertex vertex) {
    Kind kind = Kind.valueOf(vertex.getProperty(Properties.kind.name()).toString());
    switch (kind) {
    case literal:
      Object typeProperty = vertex.getProperty(Properties.type.name());
      if (typeProperty == null)
        throw new UnableToGetVertexTypeException();
View Full Code Here

    try {
      if (Literals.containsKey(valueClass)) {
        // some literals aren't so ... literal, as they can accept
        // incoming connections (like classes)
        LiteralTransformer literalTransformer = Literals.get(valueClass);
        Kind kind = literalTransformer.getKind();
        returned = database.addVertex(kind.getURIFor(vertexId, valueClass));
        if (Kind.literal.equals(kind)) {
          returned.setProperty(Properties.type.name(), TypeUtils.getType(valueClass));
        }
      } else {
        if (repository.containsKey(valueClass)) {
View Full Code Here

   * @param value
   * @see com.dooapp.gaedo.blueprints.AbstractBluePrintsBackedFinderService#setValue(com.tinkerpop.blueprints.pgm.Vertex, java.lang.Object)
   */
  @Override
  protected void setValue(Vertex vertex, Object value) {
    Kind vertexKind = GraphUtils.getKindOf(vertex);
    switch(vertexKind) {
    case literal:
      vertex.setProperty(Properties.value.name(), value);
      break;
    case uri:
View Full Code Here

TOP

Related Classes of com.dooapp.gaedo.blueprints.Kind

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.