/** Setup - Set up a test BEL {@link Document}. */
  @Before
  public void setupTest() {
    NamespaceGroup namespaceGroup = new NamespaceGroup();
    Namespace entrezGeneNs = new Namespace("EG", "http://www.belscript.org/ns/entrez-gene");
    Namespace hgncNs = new Namespace("HGNC", "http://www.belscript.org/ns/hgnc");
    namespaceGroup.setNamespaces(asList(entrezGeneNs, hgncNs));

    StatementGroup statementGroup = new StatementGroup();

    AnnotationDefinition speciesDefinition =
        new AnnotationDefinition("species", "Description", "Usage", asList("9606"));
    AnnotationDefinition tissueDefinition =
        new AnnotationDefinition("tissue", "Description", "Usage", asList("TH1", "TH2", "AB3"));

    AnnotationGroup annotationGroup = new AnnotationGroup();
    annotationGroup.setAnnotations(
        asList(
            CommonModelFactory.getInstance().createAnnotation("9606", speciesDefinition),
            CommonModelFactory.getInstance().createAnnotation("TH1", tissueDefinition)));
    annotationGroup.setEvidence(
        CommonModelFactory.getInstance()
            .createEvidence(
                "the elevation of intracellular cAMP concentration that results from increased glucagon production also plays a role in the down-regulation process"));

    statementGroup.setAnnotationGroup(annotationGroup);

    FunctionEnum p = FunctionEnum.PROTEIN_ABUNDANCE;
    List<BELObject> args = new ArrayList<BELObject>();

    args.add(CommonModelFactory.getInstance().createParameter(hgncNs, "NFKB"));
    Term t = new Term(p, args);

    FunctionEnum r = FunctionEnum.RNA_ABUNDANCE;
    args = new ArrayList<BELObject>();
    args.add(CommonModelFactory.getInstance().createParameter(hgncNs, "FAS"));
    Term t2 = new Term(r, args);

    Statement simpleIncrease =
        new Statement(
            t,
            "",
            annotationGroup,
            new org.openbel.framework.common.model.Statement.Object(t2),
            RelationshipType.INCREASES);
    statementGroup.setStatements(asList(simpleIncrease));

    Header header = new Header("", asList("Unladen"), asList("Swallow"), "", "", "", "", "");
    Document document = new Document(header, statementGroup);
    document.setDefinitions(asList(speciesDefinition, tissueDefinition));
    document.setNamespaceGroup(namespaceGroup);

    protoNetwork = new ProtoNetworkBuilder(document).buildProtoNetwork();
  }
Пример #2
0
  /** {@inheritDoc} */
  @Override
  public Citation clone() {
    Calendar newdate = null;
    if (date != null) {
      newdate = (Calendar) date.clone();
    }

    return CommonModelFactory.getInstance()
        .createCitation(name, reference, comment, newdate, authors, type);
  }