Package de.unirostock.sems.bives.api
Class RegularDiff
- java.lang.Object
-
- de.unirostock.sems.bives.api.Diff
-
- de.unirostock.sems.bives.api.RegularDiff
-
public class RegularDiff extends Diff
The Class RegularDiff to compare two regular XML documents.- Author:
- Martin Scharm
-
-
Field Summary
-
Fields inherited from class de.unirostock.sems.bives.api.Diff
ALLOW_DIFFERENT_IDS, CARE_ABOUT_NAMES, connections, STRICTER_NAMES, treeA, treeB
-
-
Constructor Summary
Constructors Constructor Description RegularDiff(de.unirostock.sems.xmlutils.ds.TreeDocument treeA, de.unirostock.sems.xmlutils.ds.TreeDocument treeB)
Instantiates a new regular diff object in order to compare two tree documents.RegularDiff(File fileA, File fileB)
Instantiates a new regular diff object in order to compare two documents stored in files fileA and fileB.RegularDiff(String docA, String docB)
Instantiates a new regular diff object in order to compare two documents stored in strings docA and docB.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHierarchyDotGraph()
Returns the component's hierarchy graph encoded in DOT language.String
getHierarchyGraph(GraphTranslator gt)
Returns the component's hierarchy graph providing an own graph translator.String
getHierarchyGraphML()
Returns the component's hierarchy graph encoded in GraphML.String
getHierarchyJsonGraph()
Returns the component's hierarchy graph encoded in JSON.String
getHTMLReport()
Returns the report encoded in HTML.String
getMarkDownReport()
Returns the report encoded MarkDown.String
getReactionsDotGraph()
Returns the graph of the reaction network encoded in DOT language.Object
getReactionsGraph(GraphTranslator gt)
Returns the graph of the reaction network providing an own graph translator.String
getReactionsGraphML()
Returns the graph of the reaction network encoded in GraphML.String
getReactionsJsonGraph()
Returns the graph of the reaction network encoded in JSON.String
getReactionsSbgnJsonGraph()
Returns the graph of the reaction network encoded in an SBGN-JSON format.String
getReport(Typesetting ts)
Returns the report providing an on markup processor.String
getReStructuredTextReport()
Returns the report encoded in ReStructured text.boolean
mapTrees(boolean allowDifferentIds, boolean careAboutNames, boolean stricterNames)
Map both trees.-
Methods inherited from class de.unirostock.sems.bives.api.Diff
getCRNDotGraph, getCRNGraph, getCRNGraphML, getCRNJsonGraph, getDiff, getDiff, getPatch, mapTrees
-
-
-
-
Constructor Detail
-
RegularDiff
public RegularDiff(File fileA, File fileB) throws de.unirostock.sems.xmlutils.exception.XmlDocumentParseException, IOException, org.jdom2.JDOMException
Instantiates a new regular diff object in order to compare two documents stored in files fileA and fileB.- Parameters:
fileA
- the file containing the former versionfileB
- the file containing the later version- Throws:
de.unirostock.sems.xmlutils.exception.XmlDocumentParseException
- the xml document parse exceptionIOException
- Signals that an I/O exception has occurred.org.jdom2.JDOMException
- the jDOM exception
-
RegularDiff
public RegularDiff(String docA, String docB) throws de.unirostock.sems.xmlutils.exception.XmlDocumentParseException, IOException, org.jdom2.JDOMException
Instantiates a new regular diff object in order to compare two documents stored in strings docA and docB.- Parameters:
docA
- the former versiondocB
- the later version- Throws:
de.unirostock.sems.xmlutils.exception.XmlDocumentParseException
- the xml document parse exceptionIOException
- Signals that an I/O exception has occurred.org.jdom2.JDOMException
- the jDOM exception
-
RegularDiff
public RegularDiff(de.unirostock.sems.xmlutils.ds.TreeDocument treeA, de.unirostock.sems.xmlutils.ds.TreeDocument treeB)
Instantiates a new regular diff object in order to compare two tree documents.- Parameters:
treeA
- the former version of the treetreeB
- the later version of the tree
-
-
Method Detail
-
mapTrees
public boolean mapTrees(boolean allowDifferentIds, boolean careAboutNames, boolean stricterNames) throws BivesConnectionException
Description copied from class:Diff
Map both trees. This method let's you decide whether- mapped entities may have different ids,
- we specially treat name attributes,
- we handle names very strictly.
Diff.ALLOW_DIFFERENT_IDS
,Diff.CARE_ABOUT_NAMES
, andDiff.STRICTER_NAMES
.- Specified by:
mapTrees
in classDiff
- Parameters:
allowDifferentIds
- are mapped entities allowed to have different ids?careAboutNames
- should we care about names?stricterNames
- should we handle names very strictly?- Returns:
- true, if successful mapped
- Throws:
BivesConnectionException
-
getReactionsGraph
public Object getReactionsGraph(GraphTranslator gt) throws Exception
Description copied from class:Diff
Returns the graph of the reaction network providing an own graph translator. Might return null if not available.- Specified by:
getReactionsGraph
in classDiff
- Parameters:
gt
- the graph translator- Returns:
- the reaction network or null if not available
- Throws:
Exception
- the exception
-
getReactionsGraphML
public String getReactionsGraphML()
Description copied from class:Diff
Returns the graph of the reaction network encoded in GraphML. Might return null if not available.- Specified by:
getReactionsGraphML
in classDiff
- Returns:
- the reaction network or null if not available
-
getReactionsDotGraph
public String getReactionsDotGraph()
Description copied from class:Diff
Returns the graph of the reaction network encoded in DOT language. Might return null if not available.- Specified by:
getReactionsDotGraph
in classDiff
- Returns:
- the reaction network or null if not available
-
getHTMLReport
public String getHTMLReport()
Description copied from class:Diff
Returns the report encoded in HTML. Might return null if not available.- Specified by:
getHTMLReport
in classDiff
- Returns:
- the hTML report or null if not available
-
getMarkDownReport
public String getMarkDownReport()
Description copied from class:Diff
Returns the report encoded MarkDown. Might return null if not available.- Specified by:
getMarkDownReport
in classDiff
- Returns:
- the mark down report or null if not available
-
getReStructuredTextReport
public String getReStructuredTextReport()
Description copied from class:Diff
Returns the report encoded in ReStructured text. Might return null if not available.- Specified by:
getReStructuredTextReport
in classDiff
- Returns:
- the ReStructured text report or null if not available
-
getHierarchyGraph
public String getHierarchyGraph(GraphTranslator gt)
Description copied from class:Diff
Returns the component's hierarchy graph providing an own graph translator. Might return null if not available.- Specified by:
getHierarchyGraph
in classDiff
- Parameters:
gt
- the graph translator- Returns:
- the hierarchy graph or null if not available
-
getHierarchyGraphML
public String getHierarchyGraphML()
Description copied from class:Diff
Returns the component's hierarchy graph encoded in GraphML. Might return null if not available.- Specified by:
getHierarchyGraphML
in classDiff
- Returns:
- the hierarchy graph or null if not available
-
getHierarchyDotGraph
public String getHierarchyDotGraph()
Description copied from class:Diff
Returns the component's hierarchy graph encoded in DOT language. Might return null if not available.- Specified by:
getHierarchyDotGraph
in classDiff
- Returns:
- the hierarchy graph or null if not available
-
getReactionsJsonGraph
public String getReactionsJsonGraph()
Description copied from class:Diff
Returns the graph of the reaction network encoded in JSON. Might return null if not available.- Specified by:
getReactionsJsonGraph
in classDiff
- Returns:
- the reaction network or null if not available
-
getHierarchyJsonGraph
public String getHierarchyJsonGraph()
Description copied from class:Diff
Returns the component's hierarchy graph encoded in JSON. Might return null if not available.- Specified by:
getHierarchyJsonGraph
in classDiff
- Returns:
- the hierarchy graph or null if not available
-
getReport
public String getReport(Typesetting ts)
Description copied from class:Diff
Returns the report providing an on markup processor. Might return null if not available.
-
getReactionsSbgnJsonGraph
public String getReactionsSbgnJsonGraph() throws Exception
Description copied from class:Diff
Returns the graph of the reaction network encoded in an SBGN-JSON format. Might return null if not available.- Specified by:
getReactionsSbgnJsonGraph
in classDiff
- Returns:
- the reaction network or null if not available
- Throws:
Exception
- the exception
-
-