Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Commit

Permalink
Merge pull request #36 from jhourani/experimental
Browse files Browse the repository at this point in the history
Fixes issue #34, implements --no-preserve.
  • Loading branch information
Nick Bargnesi committed Aug 7, 2012
2 parents 5cb2611 + dbbb862 commit 1f0ebb9
Show file tree
Hide file tree
Showing 11 changed files with 153 additions and 74 deletions.
15 changes: 11 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ set of computable networks and APIs.

.. contents::

**For a more complete guide to using the BEL Framework, we encourage you to check out our** `wiki pages`_.

The OpenBEL Ecosystem
---------------------

Expand Down Expand Up @@ -86,6 +88,7 @@ intended on serving a particular purpose.
.. _freenode IRC network: http://www.freenode.net/
.. _XChat: http://xchat.org/
.. _Xirc: http://www.aquaticx.com/
.. _wiki pages: http://wiki.openbel.org

Distribution
------------
Expand Down Expand Up @@ -151,13 +154,17 @@ contractual assumptions directly impose on those licensors and authors.
Further Reference
-----------------

**For Users:**
* Ohloh: https://www.ohloh.net/p/openbel-framework
* BEL Portal: http://openbel.org
* Selventa: http://www.selventa.com/
* API documentation: http://openbel.github.com/openbel-framework
* Freecode: http://freecode.com/projects/openbel-framework

**For Developers:**
* API documentation: http://openbel.github.com/openbel-framework
* User documentation: http://openbel-framework.readthedocs.org/en/master/
* Nightly builds: http://ci.selventa.com/browse/FWMASTER-NIGHTLY/latest/artifact
* OpenBEL build server: http://ci.selventa.com
* GitHub: https://github.com/OpenBEL
* BEL Portal: http://openbel.org
* Selventa: http://www.selventa.com/
* Ohloh: https://www.ohloh.net/p/openbel-framework
* Freecode: http://freecode.com/projects/openbel-framework

16 changes: 3 additions & 13 deletions docs/examples/belscript/test_7.bel
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,9 @@
# add a redundant extra hasMember relationship. #
# #
# No compiler arguments
# 13 nodes, 12 edges:
# p(HGNC:AKT1) -> p(PFH:"AKT Family")
# p(HGNC:AKT1) >> r(HGNC:AKT1)
# r(HGNC:AKT1) :> g(HGNC:AKT1)
# p(PFH:"AKT Family") hasMember p(HGNC:FOXO1)
# p(HGNC:FOXO1) >> r(HGNC:FOXO1)
# r(HGNC:FOXO1) :> g(HGNC:FOXO1)
# p(PFH:"AKT Family") hasMember p(HGNC:FOXO3)
# p(HGNC:FOXO3) >> r(HGNC:FOXO3)
# r(HGNC:FOXO3) :> g(HGNC:FOXO3)
# p(PFH:"AKT Family") hasMember p(HGNC:FOXO4)
# p(HGNC:FOXO4) >> r(HGNC:FOXO4)
# r(HGNC:FOXO4) :> g(HGNC:FOXO4)
# 16 nodes, 15 edges:
#
# //TODO
##################################################################################
# Document Properties Section

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,12 @@ public class Strings {
* {@value}
*/
public static final String KAM_NAME = "KAM Store name";


/*
* {@value}
*/
public static final String KAM_NAME_ALREADY_EXISTS = "KAM name already exists.\n";

/**
* {@value}
*/
Expand Down Expand Up @@ -567,6 +572,16 @@ public class Strings {
* {@value}
*/
public static final String MICRO_RNA_ABUNDANCE = "microRNAAbundance";

/*
* {@value}
*/
public final static String LONG_OPT_KAM_NAME = "kam-name";

/**
* {@value}
*/
public final static String LONG_OPT_NO_PRESERVE = "no-preserve";

/**
* {@value}
Expand Down Expand Up @@ -1141,6 +1156,11 @@ public class Strings {
* {@value}
*/
public final static String SHA_256 = "SHA-256";

/*
* {@value}
*/
public final static String SHORT_OPT_KAM_NAME = "k";

/**
* {@value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,145 +54,151 @@
public enum ExitCode {

/**
* Success.
* Success. ExitCode(0)
*/
SUCCESS(0, Strings.SUCCESS),

/**
* General failure.
* General failure. ExitCode(1)
*/
GENERAL_FAILURE(1, Strings.GENERAL_FAILURE),

/**
* Unrecoverable error.
* Unrecoverable error. ExitCode(2)
*/
UNRECOVERABLE_ERROR(2, Strings.UNRECOVERABLE_ERROR_MSG),

/**
* All documents failed validation.
* All documents failed validation. ExitCode(3)
*/
NO_VALID_DOCUMENTS(3, ALL_DOCUMENTS_FAILED_VALIDATION),

/**
* All documents failed conversion.
* All documents failed conversion. ExitCode(4)
*/
NO_CONVERTED_DOCUMENTS(4, ALL_DOCUMENTS_FAILED_CONVERSION),

/**
* No proto-networks saved.
* No proto-networks saved. ExitCode(5)
*/
NO_PROTO_NETWORKS_SAVED(5, NO_NETWORKS_SAVED),

/**
* No XBEL documents.
* No XBEL documents. ExitCode(6)
*/
NO_XBEL_DOCUMENTS(6, Strings.NO_XBEL_DOCUMENTS),

/**
* Bad output directory.
* Bad output directory. ExitCode(7)
*/
BAD_OUTPUT_DIRECTORY(7, BAD_OUTPUT_DIR),

/**
* Invalid namespace resource location.
* Invalid namespace resource location. ExitCode(8)
*/
INVALID_NAMESPACE_RESOURCE_LOCATION(8,
Strings.INVALID_NAMESPACE_RESOURCE_LOCATION),

/**
* Parse error.
* Parse error. ExitCode(9)
*/
PARSE_ERROR(9, Strings.PARSE_ERROR),

/**
* KAM connection failure.
* KAM connection failure. ExitCode(10)
*/
KAM_CONNECTION_FAILURE(10, Strings.KAM_CONNECTION_FAILURE),

/**
* No global proto network.
* No global proto network. ExitCode(11)
*/
NO_GLOBAL_PROTO_NETWORK(11, Strings.NO_GLOBAL_PROTO_NETWORK),

/**
* Failed to merge proto-networks.
* Failed to merge proto-networks. ExitCode(12)
*/
FAILED_TO_MERGE_PROTO_NETWORKS(12, Strings.NETWORK_MERGE_FAILURE),

/**
* Missing system configuration.
* Missing system configuration. ExitCode(13)
*/
MISSING_SYSTEM_CONFIGURATION(13, Strings.MISSING_SYSCFG),

/**
* Failure loading into the KAM catalog.
* Failure loading into the KAM catalog. ExitCode(14)
*/
KAM_CATALOG_LOAD_FAILED(14, Strings.KAM_CATALOG_LOAD_FAILED),

/**
* Failure deleting a directory.
* Failure deleting a directory. ExitCode(15)
*/
DIRECTORY_DELETION_FAILED(15, Strings.DIRECTORY_DELETION_FAILED),

/**
* Failed creating a directory.
* Failed creating a directory. ExitCode(16)
*/
DIRECTORY_CREATION_FAILED(16, Strings.DIRECTORY_CREATION_FAILED),


/*
* Duplicate KAM name. ExitCode(23)
*/
DUPLICATE_KAM_NAME(23, Strings.KAM_NAME_ALREADY_EXISTS),

/**
* Failed loading the KAM.
* Failed loading the KAM. ExitCode(17)
*/
KAM_LOAD_FAILURE(17, Strings.KAM_LOAD_FAILURE),


/**
* Out of memory.
* Out of memory. ExitCode(42)
*/
OOM_ERROR(42, Strings.OOM),

// PEDANTIC RETURN CODES BEYOND HERE

/**
* Pedantic validation failure.
* Pedantic validation failure. ExitCode(101)
*/
VALIDATION_FAILURE(101, PEDANTIC_VALIDATION_FAILURE),

/**
* Pedantic conversion failure.
* Pedantic conversion failure. ExitCode(102)
*/
CONVERSION_FAILURE(102, PEDANTIC_CONVERSION_FAILURE),

/**
* Pedantic namespace resolution failure.
* Pedantic namespace resolution failure. ExitCode(103)
*/
NAMESPACE_RESOLUTION_FAILURE(103, PEDANTIC_NAMESPACE_RESOLUTION_FAILURE),

/**
* Pedantic namespace indexing failure.
* Pedantic namespace indexing failure. ExitCode(104)
*/
NAMESPACE_INDEXING_FAILURE(104, PEDANTIC_NAMESPACE_INDEXING_FAILURE),

/**
* Pedantic semantic verification failure.
* Pedantic semantic verification failure. ExitCode(105)
*/
SEMANTIC_VERIFICATION_FAILURE(105, PEDANTIC_SEMANTIC_VERIFICATION_FAILURE),

/**
* Pedantic symbol verification failure.
* Pedantic symbol verification failure. ExitCode(106)
*/
SYMBOL_VERIFICATION_FAILURE(106, PEDANTIC_SYMBOL_VERIFICATION_FAILURE),

/**
* Pedantic proto-network save failure.
* Pedantic proto-network save failure. ExitCode(107)
*/
PROTO_NETWORK_SAVE_FAILURE(107, PEDANTIC_PROTO_NETWORK_SAVE_FAILURE),

/**
* Term expansion failure.
* Term expansion failure. ExitCode(108)
*/
TERM_EXPANSION_FAILURE(108, PEDANTIC_TERM_EXPANSION_FAILURE),

/**
* Statement expansion failure.
* Statement expansion failure. ExitCode(109)
*/
STATEMENT_EXPANSION_FAILURE(109, PEDANTIC_STATEMENT_EXPANSION_FAILURE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ public class StandardOptions {
* For example:<br>{@code --help}
*/
public final static String LONG_OPT_HELP = "help";

/*
* The long option to enable no-preserve.<br>
* For example:<br>{@code --no-preserve}
*/
public final static String LONG_OPT_NO_PRESERVE= "no-preserve";

/**
* Default private constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public List<Option> getCommandLineOptions() {
Option o = new Option(SHRT_OPT_SYSCFG, LONG_OPT_SYSCFG, true, help);
o.setArgName(ARG_SYSCFG);
ret.add(o);

return ret;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@
* @author Anthony Bargnesi {@code <[email protected]>}
*/
public final class PhaseFourApplication extends PhaseApplication {
private final static String SHORT_OPT_KAM_NAME = "k";
private final static String LONG_OPT_KAM_NAME = "kam-name";
private final static String SHORT_OPT_KAM_DESCRIPTION = "d";
private final static String LONG_OPT_KAM_DESCRIPTION = "kam-description";
private final static String LONG_OPT_NO_PRESERVE = "no-preserve";
private final DefaultPhaseFour p4;
private final SystemConfiguration sysconfig;

Expand Down Expand Up @@ -287,19 +284,15 @@ public List<Option> getCommandLineOptions() {
String help;
Option o;

help = KAM_NAME_HELP;
o = new Option(SHORT_OPT_KAM_NAME, LONG_OPT_KAM_NAME, true, help);
o.setArgName("kam");
options.add(o);

help = KAM_DESCRIPTION_HELP;
o = new Option(SHORT_OPT_KAM_DESCRIPTION, LONG_OPT_KAM_DESCRIPTION,
true, help);
o.setArgName("description");
options.add(o);

help = NO_PRESERVE_HELP;
o = new Option(null, LONG_OPT_NO_PRESERVE, false, help);

help = KAM_NAME_HELP;
o = new Option(SHORT_OPT_KAM_NAME, LONG_OPT_KAM_NAME, true, help);
o.setArgName("kam");
options.add(o);

return options;
Expand Down
Loading

0 comments on commit 1f0ebb9

Please sign in to comment.