Package org.structr.core.notion

Examples of org.structr.core.notion.Notion


  private NodeInterface identifyStartNode(final Relation template, final Map<String, Object> properties) throws FrameworkException {

    final Property<String> sourceIdProperty = template.getSourceIdProperty();
    final Class sourceType                  = template.getSourceType();
    final Notion notion                     = template.getStartNodeNotion();

    notion.setType(sourceType);

                PropertyKey startNodeIdentifier = notion.getPrimaryPropertyKey();

                if (startNodeIdentifier != null) {

                        Object identifierValue = properties.get(startNodeIdentifier.dbName());

                        properties.remove(sourceIdProperty.dbName());

                        return (NodeInterface)notion.getAdapterForSetter(securityContext).adapt(identifierValue);

                }

    return null;
  }
View Full Code Here


  private NodeInterface identifyEndNode(final Relation template, final Map<String, Object> properties) throws FrameworkException {

    final Property<String> targetIdProperty = template.getTargetIdProperty();
    final Class targetType                  = template.getTargetType();
    final Notion notion                     = template.getEndNodeNotion();

    notion.setType(targetType);

                final PropertyKey endNodeIdentifier = notion.getPrimaryPropertyKey();
                if (endNodeIdentifier != null) {

                        Object identifierValue = properties.get(endNodeIdentifier.dbName());

                        properties.remove(targetIdProperty.dbName());

                        return (NodeInterface)notion.getAdapterForSetter(securityContext).adapt(identifierValue);

                }

    return null;
  }
View Full Code Here

        return null;
      }

      // fetch notion
      final Notion notion = relationProperty.getNotion();
      final PropertyKey primaryPropertyKey = notion.getPrimaryPropertyKey();

      // apply notion if the property set contains the ID property as the only element
      if (primaryPropertyKey != null && propertySet.containsKey(primaryPropertyKey.jsonName()) && propertySet.size() == 1) {

        /*
 
View Full Code Here

  }

  @Override
  public PropertyConverter<?, List<T>> inputConverter(SecurityContext securityContext) {
   
    Notion notion = traverserInterface.getNotion();
    if (notion != null) {
   
      return notion.getCollectionConverter(securityContext);
    }
   
    return null;
  }
View Full Code Here

      List results = new LinkedList();

      try {
        for(NodeInterface node : nodes) {

          Notion notion = aggregation.getNotionForType(node.getClass());
          if(notion != null) {

            results.add(notion.getAdapterForGetter(securityContext).adapt(node));

          } else {

            results.add(node);
          }
View Full Code Here

  }

  @Override
  public PropertyConverter<?, T> inputConverter(SecurityContext securityContext) {
   
    Notion notion = traverserInterface.getNotion();
    if (notion != null) {
   
      return notion.getEntityConverter(securityContext);
    }
   
    return null;
  }
View Full Code Here

TOP

Related Classes of org.structr.core.notion.Notion

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.