Skip to content

Commit

Permalink
update mongodb configuration
Browse files Browse the repository at this point in the history
update mongdb entities in order to work in cycle enviroments
  • Loading branch information
danimaniarqsoft committed May 12, 2017
1 parent 8ccb669 commit 18f1c8e
Show file tree
Hide file tree
Showing 44 changed files with 263 additions and 72 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<version>1.5.3.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
package mx.infotec.dads.essence.model;

import org.omg.essence.model.GraphicalElement;
import org.springframework.data.annotation.Id;

/**
* The Class GraphicalElement. It is one of four data types used for attributes.
Expand All @@ -33,6 +34,17 @@
* @since essence 1.1
*/
public class SEGraphicalElement implements GraphicalElement {
@Id
private String id;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

/**
* It most be a concrete class
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.Collection;

import org.omg.essence.model.activityspaceandactivity.AbstractActivity;
import org.springframework.data.mongodb.core.mapping.DBRef;

import mx.infotec.dads.essence.model.foundation.SEBasicElement;

Expand Down Expand Up @@ -62,12 +63,14 @@
public abstract class SEAbstractActivity extends SEBasicElement implements AbstractActivity {

/** The activity association. */
@DBRef
protected Collection<? extends SEActivityAssociation> activityAssociation;

/**
* The criterion. A collection of criteria that have to be fulfilled for
* entering the activity or considering the activity completed
*/
@DBRef
protected Collection<? extends SECriterion> criterion;

public Collection<? extends SEActivityAssociation> getActivityAssociation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

import org.omg.essence.model.activityspaceandactivity.Action;
import org.omg.essence.model.activityspaceandactivity.ActionKind;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import mx.infotec.dads.essence.model.alphaandworkproduct.SEAlpha;
import mx.infotec.dads.essence.model.alphaandworkproduct.SEWorkProduct;
Expand Down Expand Up @@ -84,20 +86,26 @@
* @version 1.1
* @since essence 1.1
*/
@Document(collection = "actions")
public class SEAction extends SELanguageElement implements Action {

/** The activity. */
protected SEActivity activity;
@DBRef
private SEActivity activity;

/** The alpha. */
protected Collection<? extends SEAlpha> alpha;
@DBRef
private Collection<? extends SEAlpha> alpha;

/** The work product. */
protected Collection<? extends SEWorkProduct> workProduct;
@DBRef
private Collection<? extends SEWorkProduct> workProduct;

/** The kind. */
protected ActionKind kind;
@DBRef
private ActionKind kind;

@Override
public SEActivity getActivity() {
return activity;
}
Expand All @@ -106,6 +114,7 @@ public void setActivity(SEActivity activity) {
this.activity = activity;
}

@Override
public Collection<? extends SEAlpha> getAlpha() {
return alpha;
}
Expand All @@ -114,6 +123,7 @@ public void setAlpha(Collection<? extends SEAlpha> alpha) {
this.alpha = alpha;
}

@Override
public Collection<? extends SEWorkProduct> getWorkProduct() {
return workProduct;
}
Expand All @@ -122,12 +132,12 @@ public void setWorkProduct(Collection<? extends SEWorkProduct> workProduct) {
this.workProduct = workProduct;
}

@Override
public ActionKind getKind() {
return kind;
}

public void setKind(ActionKind kind) {
this.kind = kind;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import java.util.Collection;

import org.omg.essence.model.activityspaceandactivity.Activity;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import mx.infotec.dads.essence.model.competency.SECompetencyLevel;

Expand Down Expand Up @@ -82,15 +84,19 @@
* @version 1.1
* @since essence 1.1
*/
public class SEActivity extends SEAbstractActivity implements Activity{
@Document(collection = "activities")
public class SEActivity extends SEAbstractActivity implements Activity {

/** The approach. */
@DBRef
private Collection<? extends SEApproach> approach;

/** The action. */
@DBRef
private Collection<? extends SEAction> action;

/** The required competency level. */
@DBRef
private Collection<? extends SECompetencyLevel> requiredCompetencyLevel;

public Collection<? extends SEApproach> getApproach() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
package mx.infotec.dads.essence.model.activityspaceandactivity;

import org.omg.essence.model.activityspaceandactivity.ActivityAssociation;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import mx.infotec.dads.essence.model.foundation.SELanguageElement;

Expand Down Expand Up @@ -79,12 +81,15 @@
* @version 1.1
* @since essence 1.1
*/
public class SEActivityAssociation extends SELanguageElement implements ActivityAssociation{
@Document(collection = "activityassociations")
public class SEActivityAssociation extends SELanguageElement implements ActivityAssociation {

/** The first member of the association. */
@DBRef
private SEAbstractActivity end2;

/** The second member of the association. */
@DBRef
private SEAbstractActivity end1;

/** The kind of the association. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import java.util.Collection;

import org.omg.essence.model.activityspaceandactivity.ActivitySpace;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import mx.infotec.dads.essence.model.alphaandworkproduct.SEAlpha;

Expand Down Expand Up @@ -66,18 +68,20 @@
* @version 1.1
* @since essence 1.1
*/
@Document(collection = "activityspaces")
public class SEActivitySpace extends SEAbstractActivity implements ActivitySpace {

/**
* A collection of alphas that have to be present to be successful in
* fulfilling the objectives of this activity space.
*/
@DBRef
private Collection<? extends SEAlpha> input;

public Collection<? extends SEAlpha> getInput() {
return input;
}

public void setInput(Collection<? extends SEAlpha> input) {
this.input = input;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
package mx.infotec.dads.essence.model.activityspaceandactivity;

import org.omg.essence.model.activityspaceandactivity.Approach;
import org.springframework.data.mongodb.core.mapping.DBRef;

import mx.infotec.dads.essence.model.foundation.SELanguageElement;

Expand Down Expand Up @@ -60,6 +61,7 @@
public class SEApproach extends SELanguageElement implements Approach {

/** The activity */
@DBRef
private SEActivity activity;

/** The name of the Approach */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import org.omg.essence.model.activityspaceandactivity.CompletionCriterion;
import org.omg.essence.model.activityspaceandactivity.Criterion;
import org.springframework.data.mongodb.core.mapping.Document;

/**
* <pre>
Expand All @@ -51,5 +52,6 @@
* @version 1.1
* @since essence 1.1
*/
@Document(collection="completioncriteria")
public class SECompletionCriterion extends SECriterion implements CompletionCriterion {
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import org.omg.essence.model.activityspaceandactivity.Criterion;
import org.omg.essence.model.activityspaceandactivity.EntryCriterion;
import org.springframework.data.mongodb.core.mapping.Document;

/**
* <pre>
Expand Down Expand Up @@ -55,5 +56,6 @@
* @version 1.1
* @since essence 1.1
*/
@Document(collection = "entrycriteria")
public class SEEntryCriterion extends SECriterion implements EntryCriterion {
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import java.util.Collection;

import org.omg.essence.model.alphaandworkproduct.Alpha;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import mx.infotec.dads.essence.model.activityspaceandactivity.SEAction;
import mx.infotec.dads.essence.model.activityspaceandactivity.SEActivitySpace;
Expand Down Expand Up @@ -97,24 +99,31 @@
* @version 1.1
* @since essence 1.1
*/
@Document(collection = "alphas")
public class SEAlpha extends SEBasicElement implements Alpha {

/** The states of the alpha. */
@DBRef
private Collection<? extends SEState> states;

/** The action. */
@DBRef
private Collection<? extends SEAction> action;

/** The activity space. */
@DBRef
private SEActivitySpace activitySpace;

/** The alpha containment. */
@DBRef
private Collection<? extends SEAlphaContainment> alphaContainment;

/** The alpha association. */
@DBRef
private Collection<? extends SEAlphaAssociation> alphaAssociation;

/** The work product manifest. */
@DBRef
private Collection<? extends SEWorkProductManifest> workProductManifest;

public Collection<? extends SEState> getStates() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

import org.omg.essence.model.alphaandworkproduct.Alpha;
import org.omg.essence.model.alphaandworkproduct.AlphaAssociation;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import mx.infotec.dads.essence.model.foundation.SELanguageElement;

Expand Down Expand Up @@ -63,6 +65,7 @@
* @version 1.1
* @since essence 1.1
*/
@Document(collection="alphaassociations")
public class SEAlphaAssociation extends SELanguageElement implements AlphaAssociation {

/** Lower bound of association endpoint 1. */
Expand All @@ -81,9 +84,11 @@ public class SEAlphaAssociation extends SELanguageElement implements AlphaAssoci
private String name;

/** The alpha endpoint 1 of the association. */
@DBRef
private SEAlpha end1;

/** The alpha endpoint 2 of the association. */
@DBRef
private SEAlpha end2;

public int getEnd1lowerBound() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
package mx.infotec.dads.essence.model.alphaandworkproduct;

import org.omg.essence.model.alphaandworkproduct.AlphaContainment;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import mx.infotec.dads.essence.model.foundation.SELanguageElement;

Expand Down Expand Up @@ -61,6 +63,7 @@
* @version 1.1
* @since essence 1.1
*/
@Document(collection = "alphacontainments")
public class SEAlphaContainment extends SELanguageElement implements AlphaContainment {

/** Lower bound for the number of instances of the sub(ordinate)-alpha. */
Expand All @@ -70,9 +73,11 @@ public class SEAlphaContainment extends SELanguageElement implements AlphaContai
private int upperBound;

/** The super alpha */
@DBRef
private SEAlpha superAlpha;

/** The subordinate alpha. */
@DBRef
private SEAlpha subordinateAlpha;

public int getLowerBound() {
Expand Down
Loading

0 comments on commit 18f1c8e

Please sign in to comment.