Examples of Relationships


Examples of org.apache.openejb.jee.Relationships

                }
            }
        }
        entityMappings.getMappedSuperclass().addAll(mappedSuperclassByClass.values());

        Relationships relationships = ejbJar.getRelationships();
        if (relationships != null) {
            for (EjbRelation relation : relationships.getEjbRelation()) {
                List<EjbRelationshipRole> roles = relation.getEjbRelationshipRole();
                // if we don't have two roles, the relation is bad so we skip it
                if (roles.size() != 2) {
                    continue;
                }
View Full Code Here

Examples of org.apache.openejb.jee.Relationships

                }
            }

            // if there are relationships defined in this jar, get a list of the defined
            // entities and process the relationship maps.
            final Relationships relationships = ejbJar.getRelationships();
            if (relationships != null) {

                final Map<String, Entity> entitiesByEjbName = new TreeMap<String, Entity>();
                for (final Entity entity : cmpMappings.getEntity()) {
                    entitiesByEjbName.put(entity.getEjbName(), entity);
                }

                for (final EjbRelation relation : relationships.getEjbRelation()) {
                    processRelationship(entitiesByEjbName, relation);
                }
            }

            // Let's warn the user about any declarations we didn't end up using
View Full Code Here

Examples of org.apache.openejb.jee.Relationships

                }
            }

            // if there are relationships defined in this jar, get a list of the defined
            // entities and process the relationship maps.
            final Relationships relationships = ejbJar.getRelationships();
            if (relationships != null) {

                final Map<String, Entity> entitiesByEjbName = new TreeMap<String, Entity>();
                for (final Entity entity : cmpMappings.getEntity()) {
                    entitiesByEjbName.put(entity.getEjbName(), entity);
                }

                for (final EjbRelation relation : relationships.getEjbRelation()) {
                    processRelationship(entitiesByEjbName, relation);
                }
            }

            // Let's warn the user about any declarations we didn't end up using
View Full Code Here

Examples of org.docx4j.relationships.Relationships

      Base sourcePart,
      Base targetPart,
      Set<String> relationshipTypes) throws Docx4JException {
   
    RelationshipsPart sourceRelationshipsPart = sourcePart.getRelationshipsPart(false);
    Relationships sourceRelationships = (sourceRelationshipsPart != null ?
                          sourceRelationshipsPart.getRelationships() :
                     null);
    List<Relationship> sourceRelationshipList = (sourceRelationships != null ?
                              sourceRelationships.getRelationship() :
                           null);
   
    RelationshipsPart targetRelationshipsPart = null;
    Relationships targetRelationships = null;
   
    Relationship sourceRelationship = null;
    Relationship targetRelationship = null;
   
    Part sourceChild = null;
    Part targetChild = null;
   
    if ((sourceRelationshipList != null) &&
      (!sourceRelationshipList.isEmpty())) {
     
      targetRelationshipsPart = targetPart.getRelationshipsPart(); //create if needed
      targetRelationships = targetRelationshipsPart.getRelationships();
     
      for (int i=0; i<sourceRelationshipList.size(); i++) {
       
        sourceRelationship = sourceRelationshipList.get(i);
        //the Relationship doesn't have any references to parts, therefore it can be reused
        targetRelationships.getRelationship().add(sourceRelationship);
       
        if (sourceRelationship.getTargetMode()==null
            // per ECMA 376 4ed Part 2, capitalisation should be thus: "External"
            // but we can relax this..
            || !"external".equals(sourceRelationship.getTargetMode().toLowerCase())) {
View Full Code Here

Examples of org.docx4j.relationships.Relationships

   
    // Change the rels to TargetMode="External"
    // Fetch rels part
    MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
    RelationshipsPart relsPart = documentPart.getRelationshipsPart();
    Relationships rels = relsPart.getRelationships();
    List<Relationship> relsList = rels.getRelationship();
   
    // For each image rel
    for (Relationship r : relsList) {

      System.out.println(r.getTargetMode());
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.