Commit message:
Uploaded |
added:
NGSrich_0.5.5/.classpath NGSrich_0.5.5/.project NGSrich_0.5.5/.settings/org.eclipse.jdt.core.prefs NGSrich_0.5.5/R/eval_details.R NGSrich_0.5.5/R/eval_enrichment.R NGSrich_0.5.5/R/summarize_enrichment.R NGSrich_0.5.5/README NGSrich_0.5.5/bin/DEFAULT.properties NGSrich_0.5.5/bin/NGSrich.class NGSrich_0.5.5/bin/_main/Enrichment.class NGSrich_0.5.5/bin/_main/EnrichmentStatsComputer.class NGSrich_0.5.5/bin/_main/NGSrichEvaluate.class NGSrich_0.5.5/bin/_main/NGSrichSummarize.class NGSrich_0.5.5/bin/converters/Read2Wig.class NGSrich_0.5.5/bin/converters/ReadOnTarget2Wig.class NGSrich_0.5.5/bin/dataGenerators/AnnotationDataGenerator.class NGSrich_0.5.5/bin/dataGenerators/ReadAlginmentDataGenerator.class NGSrich_0.5.5/bin/dataGenerators/TargetDataGenerator.class NGSrich_0.5.5/bin/dataGenerators/TestDataGenerator.class NGSrich_0.5.5/bin/datastructures/AVLNode.class NGSrich_0.5.5/bin/datastructures/AVLTree.class NGSrich_0.5.5/bin/datastructures/AnnotationLine.class NGSrich_0.5.5/bin/datastructures/Format.class NGSrich_0.5.5/bin/datastructures/Frame.class NGSrich_0.5.5/bin/datastructures/GenomeFrame.class NGSrich_0.5.5/bin/datastructures/GenomeLine.class NGSrich_0.5.5/bin/datastructures/Line.class NGSrich_0.5.5/bin/datastructures/Read.class NGSrich_0.5.5/bin/datastructures/ReadFrame.class NGSrich_0.5.5/bin/datastructures/ReadLine.class NGSrich_0.5.5/bin/datastructures/ReducedReadLine.class NGSrich_0.5.5/bin/datastructures/TargetLine.class NGSrich_0.5.5/bin/exceptions/ChromosomeException.class NGSrich_0.5.5/bin/exceptions/ChromosomeFormatException.class NGSrich_0.5.5/bin/exceptions/ChromosomeMismatchException.class NGSrich_0.5.5/bin/exceptions/ChromosomeNotFoundException.class NGSrich_0.5.5/bin/exceptions/FileFormatException.class NGSrich_0.5.5/bin/exceptions/GenomeAnnotationException.class NGSrich_0.5.5/bin/exceptions/NullOrNegativeRangeException.class NGSrich_0.5.5/bin/exceptions/RangeException.class NGSrich_0.5.5/bin/exceptions/RangeFormatException.class NGSrich_0.5.5/bin/exceptions/RangeLimitNotFoundException.class NGSrich_0.5.5/bin/filters/Filter.class NGSrich_0.5.5/bin/filters/GenomeFilter.class NGSrich_0.5.5/bin/filters/ReadFilter.class NGSrich_0.5.5/bin/filters/TargetFilter.class NGSrich_0.5.5/bin/middlewares/GeneExtractor.class NGSrich_0.5.5/bin/middlewares/HitsCounter.class NGSrich_0.5.5/bin/middlewares/Misc.class NGSrich_0.5.5/bin/middlewares/ReadCounter.class NGSrich_0.5.5/bin/middlewares/XMLSummaryFileBuilder.class NGSrich_0.5.5/bin/org/jdom/Attribute.class NGSrich_0.5.5/bin/org/jdom/AttributeList.class NGSrich_0.5.5/bin/org/jdom/CDATA.class NGSrich_0.5.5/bin/org/jdom/Comment.class NGSrich_0.5.5/bin/org/jdom/Content.class NGSrich_0.5.5/bin/org/jdom/ContentList$FilterList.class NGSrich_0.5.5/bin/org/jdom/ContentList$FilterListIterator.class NGSrich_0.5.5/bin/org/jdom/ContentList.class NGSrich_0.5.5/bin/org/jdom/DataConversionException.class NGSrich_0.5.5/bin/org/jdom/DefaultJDOMFactory.class NGSrich_0.5.5/bin/org/jdom/DescendantIterator.class NGSrich_0.5.5/bin/org/jdom/DocType.class NGSrich_0.5.5/bin/org/jdom/Document.class NGSrich_0.5.5/bin/org/jdom/Element.class NGSrich_0.5.5/bin/org/jdom/EntityRef.class NGSrich_0.5.5/bin/org/jdom/FilterIterator.class NGSrich_0.5.5/bin/org/jdom/IllegalAddException.class NGSrich_0.5.5/bin/org/jdom/IllegalDataException.class NGSrich_0.5.5/bin/org/jdom/IllegalNameException.class NGSrich_0.5.5/bin/org/jdom/IllegalTargetException.class NGSrich_0.5.5/bin/org/jdom/JDOMException.class NGSrich_0.5.5/bin/org/jdom/JDOMFactory.class NGSrich_0.5.5/bin/org/jdom/Namespace.class NGSrich_0.5.5/bin/org/jdom/NamespaceKey.class NGSrich_0.5.5/bin/org/jdom/Parent.class NGSrich_0.5.5/bin/org/jdom/ProcessingInstruction.class NGSrich_0.5.5/bin/org/jdom/Text.class NGSrich_0.5.5/bin/org/jdom/UncheckedJDOMFactory.class NGSrich_0.5.5/bin/org/jdom/Verifier.class NGSrich_0.5.5/bin/org/jdom/adapters/AbstractDOMAdapter.class NGSrich_0.5.5/bin/org/jdom/adapters/CrimsonDOMAdapter.class NGSrich_0.5.5/bin/org/jdom/adapters/DOMAdapter.class NGSrich_0.5.5/bin/org/jdom/adapters/JAXPDOMAdapter.class NGSrich_0.5.5/bin/org/jdom/adapters/OracleV1DOMAdapter.class NGSrich_0.5.5/bin/org/jdom/adapters/OracleV2DOMAdapter.class NGSrich_0.5.5/bin/org/jdom/adapters/XML4JDOMAdapter.class NGSrich_0.5.5/bin/org/jdom/adapters/XercesDOMAdapter.class NGSrich_0.5.5/bin/org/jdom/adapters/package.html NGSrich_0.5.5/bin/org/jdom/filter/AbstractFilter.class NGSrich_0.5.5/bin/org/jdom/filter/AndFilter.class NGSrich_0.5.5/bin/org/jdom/filter/ContentFilter.class NGSrich_0.5.5/bin/org/jdom/filter/ElementFilter.class NGSrich_0.5.5/bin/org/jdom/filter/Filter.class NGSrich_0.5.5/bin/org/jdom/filter/NegateFilter.class NGSrich_0.5.5/bin/org/jdom/filter/OrFilter.class NGSrich_0.5.5/bin/org/jdom/filter/package.html NGSrich_0.5.5/bin/org/jdom/input/BuilderErrorHandler.class NGSrich_0.5.5/bin/org/jdom/input/DOMBuilder.class NGSrich_0.5.5/bin/org/jdom/input/JAXPParserFactory.class NGSrich_0.5.5/bin/org/jdom/input/JDOMParseException.class NGSrich_0.5.5/bin/org/jdom/input/SAXBuilder.class NGSrich_0.5.5/bin/org/jdom/input/SAXHandler.class NGSrich_0.5.5/bin/org/jdom/input/TextBuffer.class NGSrich_0.5.5/bin/org/jdom/input/package.html NGSrich_0.5.5/bin/org/jdom/output/DOMOutputter.class NGSrich_0.5.5/bin/org/jdom/output/EscapeStrategy.class NGSrich_0.5.5/bin/org/jdom/output/Format$DefaultEscapeStrategy.class NGSrich_0.5.5/bin/org/jdom/output/Format$TextMode.class NGSrich_0.5.5/bin/org/jdom/output/Format.class NGSrich_0.5.5/bin/org/jdom/output/JDOMLocator.class NGSrich_0.5.5/bin/org/jdom/output/NamespaceStack.class NGSrich_0.5.5/bin/org/jdom/output/SAXOutputter.class NGSrich_0.5.5/bin/org/jdom/output/XMLOutputter$NamespaceStack.class NGSrich_0.5.5/bin/org/jdom/output/XMLOutputter.class NGSrich_0.5.5/bin/org/jdom/output/package.html NGSrich_0.5.5/bin/org/jdom/package.html NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult$DocumentBuilder.class NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult$FragmentHandler.class NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult.class NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource$DocumentReader.class NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource$JDOMInputSource.class NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource.class NGSrich_0.5.5/bin/org/jdom/transform/XSLTransformException.class NGSrich_0.5.5/bin/org/jdom/transform/XSLTransformer.class NGSrich_0.5.5/bin/org/jdom/transform/package.html NGSrich_0.5.5/bin/org/jdom/xpath/XPath$XPathString.class NGSrich_0.5.5/bin/org/jdom/xpath/XPath.class NGSrich_0.5.5/bin/org/jdom/xpath/package.html NGSrich_0.5.5/bin/xmlFilePattern.xml NGSrich_0.5.5/src/DEFAULT.properties NGSrich_0.5.5/src/NGSrich.java NGSrich_0.5.5/src/_main/Enrichment.java NGSrich_0.5.5/src/_main/EnrichmentStatsComputer.java NGSrich_0.5.5/src/_main/NGSrichEvaluate.java NGSrich_0.5.5/src/_main/NGSrichSummarize.java NGSrich_0.5.5/src/converters/Read2Wig.java NGSrich_0.5.5/src/converters/ReadOnTarget2Wig.java NGSrich_0.5.5/src/dataGenerators/AnnotationDataGenerator.java NGSrich_0.5.5/src/dataGenerators/ReadAlginmentDataGenerator.java NGSrich_0.5.5/src/dataGenerators/TargetDataGenerator.java NGSrich_0.5.5/src/dataGenerators/TestDataGenerator.java NGSrich_0.5.5/src/datastructures/AVLNode.java NGSrich_0.5.5/src/datastructures/AVLTree.java NGSrich_0.5.5/src/datastructures/AnnotationLine.java NGSrich_0.5.5/src/datastructures/Format.java NGSrich_0.5.5/src/datastructures/Frame.java NGSrich_0.5.5/src/datastructures/GenomeFrame.java NGSrich_0.5.5/src/datastructures/GenomeLine.java NGSrich_0.5.5/src/datastructures/Line.java NGSrich_0.5.5/src/datastructures/Read.java NGSrich_0.5.5/src/datastructures/ReadFrame.java NGSrich_0.5.5/src/datastructures/ReadLine.java NGSrich_0.5.5/src/datastructures/ReducedReadLine.java NGSrich_0.5.5/src/datastructures/TargetLine.java NGSrich_0.5.5/src/exceptions/ChromosomeException.java NGSrich_0.5.5/src/exceptions/ChromosomeFormatException.java NGSrich_0.5.5/src/exceptions/ChromosomeMismatchException.java NGSrich_0.5.5/src/exceptions/ChromosomeNotFoundException.java NGSrich_0.5.5/src/exceptions/FileFormatException.java NGSrich_0.5.5/src/exceptions/GenomeAnnotationException.java NGSrich_0.5.5/src/exceptions/NullOrNegativeRangeException.java NGSrich_0.5.5/src/exceptions/RangeException.java NGSrich_0.5.5/src/exceptions/RangeFormatException.java NGSrich_0.5.5/src/exceptions/RangeLimitNotFoundException.java NGSrich_0.5.5/src/filters/Filter.java NGSrich_0.5.5/src/filters/GenomeFilter.java NGSrich_0.5.5/src/filters/ReadFilter.java NGSrich_0.5.5/src/filters/TargetFilter.java NGSrich_0.5.5/src/middlewares/GeneExtractor.java NGSrich_0.5.5/src/middlewares/HitsCounter.java NGSrich_0.5.5/src/middlewares/Misc.java NGSrich_0.5.5/src/middlewares/ReadCounter.java NGSrich_0.5.5/src/middlewares/XMLSummaryFileBuilder.java NGSrich_0.5.5/src/org/jdom/Attribute.java NGSrich_0.5.5/src/org/jdom/AttributeList.java NGSrich_0.5.5/src/org/jdom/CDATA.java NGSrich_0.5.5/src/org/jdom/Comment.java NGSrich_0.5.5/src/org/jdom/Content.java NGSrich_0.5.5/src/org/jdom/ContentList.java NGSrich_0.5.5/src/org/jdom/DataConversionException.java NGSrich_0.5.5/src/org/jdom/DefaultJDOMFactory.java NGSrich_0.5.5/src/org/jdom/DescendantIterator.java NGSrich_0.5.5/src/org/jdom/DocType.java NGSrich_0.5.5/src/org/jdom/Document.java NGSrich_0.5.5/src/org/jdom/Element.java NGSrich_0.5.5/src/org/jdom/EntityRef.java NGSrich_0.5.5/src/org/jdom/FilterIterator.java NGSrich_0.5.5/src/org/jdom/IllegalAddException.java NGSrich_0.5.5/src/org/jdom/IllegalDataException.java NGSrich_0.5.5/src/org/jdom/IllegalNameException.java NGSrich_0.5.5/src/org/jdom/IllegalTargetException.java NGSrich_0.5.5/src/org/jdom/JDOMException.java NGSrich_0.5.5/src/org/jdom/JDOMFactory.java NGSrich_0.5.5/src/org/jdom/Namespace.java NGSrich_0.5.5/src/org/jdom/NamespaceKey.java NGSrich_0.5.5/src/org/jdom/Parent.java NGSrich_0.5.5/src/org/jdom/ProcessingInstruction.java NGSrich_0.5.5/src/org/jdom/Text.java NGSrich_0.5.5/src/org/jdom/UncheckedJDOMFactory.java NGSrich_0.5.5/src/org/jdom/Verifier.java NGSrich_0.5.5/src/org/jdom/adapters/AbstractDOMAdapter.java NGSrich_0.5.5/src/org/jdom/adapters/CrimsonDOMAdapter.java NGSrich_0.5.5/src/org/jdom/adapters/DOMAdapter.java NGSrich_0.5.5/src/org/jdom/adapters/JAXPDOMAdapter.java NGSrich_0.5.5/src/org/jdom/adapters/OracleV1DOMAdapter.java NGSrich_0.5.5/src/org/jdom/adapters/OracleV2DOMAdapter.java NGSrich_0.5.5/src/org/jdom/adapters/XML4JDOMAdapter.java NGSrich_0.5.5/src/org/jdom/adapters/XercesDOMAdapter.java NGSrich_0.5.5/src/org/jdom/adapters/package.html NGSrich_0.5.5/src/org/jdom/filter/AbstractFilter.java NGSrich_0.5.5/src/org/jdom/filter/AndFilter.java NGSrich_0.5.5/src/org/jdom/filter/ContentFilter.java NGSrich_0.5.5/src/org/jdom/filter/ElementFilter.java NGSrich_0.5.5/src/org/jdom/filter/Filter.java NGSrich_0.5.5/src/org/jdom/filter/NegateFilter.java NGSrich_0.5.5/src/org/jdom/filter/OrFilter.java NGSrich_0.5.5/src/org/jdom/filter/package.html NGSrich_0.5.5/src/org/jdom/input/BuilderErrorHandler.java NGSrich_0.5.5/src/org/jdom/input/DOMBuilder.java NGSrich_0.5.5/src/org/jdom/input/JAXPParserFactory.java NGSrich_0.5.5/src/org/jdom/input/JDOMParseException.java NGSrich_0.5.5/src/org/jdom/input/SAXBuilder.java NGSrich_0.5.5/src/org/jdom/input/SAXHandler.java NGSrich_0.5.5/src/org/jdom/input/TextBuffer.java NGSrich_0.5.5/src/org/jdom/input/package.html NGSrich_0.5.5/src/org/jdom/output/DOMOutputter.java NGSrich_0.5.5/src/org/jdom/output/EscapeStrategy.java NGSrich_0.5.5/src/org/jdom/output/Format.java NGSrich_0.5.5/src/org/jdom/output/JDOMLocator.java NGSrich_0.5.5/src/org/jdom/output/NamespaceStack.java NGSrich_0.5.5/src/org/jdom/output/SAXOutputter.java NGSrich_0.5.5/src/org/jdom/output/XMLOutputter.java NGSrich_0.5.5/src/org/jdom/output/package.html NGSrich_0.5.5/src/org/jdom/package.html NGSrich_0.5.5/src/org/jdom/transform/JDOMResult.java NGSrich_0.5.5/src/org/jdom/transform/JDOMSource.java NGSrich_0.5.5/src/org/jdom/transform/XSLTransformException.java NGSrich_0.5.5/src/org/jdom/transform/XSLTransformer.java NGSrich_0.5.5/src/org/jdom/transform/package.html NGSrich_0.5.5/src/org/jdom/xpath/JaxenXPath.java NGSrich_0.5.5/src/org/jdom/xpath/XPath.java NGSrich_0.5.5/src/org/jdom/xpath/package.html NGSrich_0.5.5/src/xmlFilePattern.xml NGSrich_0.5.5/thirdparty/backup-files/anoGam1.txt.gz NGSrich_0.5.5/thirdparty/backup-files/bosTau4.txt.gz NGSrich_0.5.5/thirdparty/backup-files/cb3.txt.gz NGSrich_0.5.5/thirdparty/backup-files/ce4.txt.gz NGSrich_0.5.5/thirdparty/backup-files/ce6.txt.gz NGSrich_0.5.5/thirdparty/backup-files/danRer5.txt.gz NGSrich_0.5.5/thirdparty/backup-files/danRer6.txt.gz NGSrich_0.5.5/thirdparty/backup-files/danRer7.txt.gz NGSrich_0.5.5/thirdparty/backup-files/dm2.txt.gz NGSrich_0.5.5/thirdparty/backup-files/dm3.txt.gz NGSrich_0.5.5/thirdparty/backup-files/galGal2.txt.gz NGSrich_0.5.5/thirdparty/backup-files/galGal3.txt.gz NGSrich_0.5.5/thirdparty/backup-files/hg18.txt.gz NGSrich_0.5.5/thirdparty/backup-files/hg19.txt.gz NGSrich_0.5.5/thirdparty/backup-files/mm8.txt.gz NGSrich_0.5.5/thirdparty/backup-files/mm9.txt.gz NGSrich_0.5.5/thirdparty/backup-files/panTro3.txt.gz NGSrich_0.5.5/thirdparty/backup-files/rn3.txt.gz NGSrich_0.5.5/thirdparty/backup-files/rn4.txt.gz NGSrich_0.5.5/thirdparty/backup-files/susScr2.txt.gz NGSrich_0.5.5/thirdparty/chromInfo/anoGam1.txt NGSrich_0.5.5/thirdparty/chromInfo/bosTau4.txt NGSrich_0.5.5/thirdparty/chromInfo/cb3.txt NGSrich_0.5.5/thirdparty/chromInfo/ce4.txt NGSrich_0.5.5/thirdparty/chromInfo/ce6.txt NGSrich_0.5.5/thirdparty/chromInfo/danRer5.txt NGSrich_0.5.5/thirdparty/chromInfo/danRer6.txt NGSrich_0.5.5/thirdparty/chromInfo/danRer7.txt NGSrich_0.5.5/thirdparty/chromInfo/dm2.txt NGSrich_0.5.5/thirdparty/chromInfo/dm3.txt NGSrich_0.5.5/thirdparty/chromInfo/galGal2.txt NGSrich_0.5.5/thirdparty/chromInfo/galGal3.txt NGSrich_0.5.5/thirdparty/chromInfo/hg18.txt NGSrich_0.5.5/thirdparty/chromInfo/hg19.txt NGSrich_0.5.5/thirdparty/chromInfo/mm8.txt NGSrich_0.5.5/thirdparty/chromInfo/mm9.txt NGSrich_0.5.5/thirdparty/chromInfo/panTro3.txt NGSrich_0.5.5/thirdparty/chromInfo/rn3.txt NGSrich_0.5.5/thirdparty/chromInfo/rn4.txt NGSrich_0.5.5/thirdparty/chromInfo/susScr2.txt NGSrich_0.5.5/thirdparty/fetchChromSizes NGSrich_0.5.5/thirdparty/samtools/0.1.16/samtools NGSrich_0.5.5/thirdparty/wigToBigWig |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/.classpath --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/.classpath Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="output" path="bin"/> +</classpath> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/.project --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/.project Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>NGSrich_0.5.5</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/.settings/org.eclipse.jdt.core.prefs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/.settings/org.eclipse.jdt.core.prefs Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,12 @@ +#Tue Sep 13 11:09:23 CEST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/R/eval_details.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/R/eval_details.R Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,163 @@\n+#!/usr/bin/Rscript\n+\n+\n+##Input parameters########################################################################################################################\n+xml=as.character(commandArgs()[6])\n+bed=as.character(commandArgs()[7])\n+cov=as.character(commandArgs()[8])\n+chrinfo=as.character(commandArgs()[9])\n+outdir=as.character(commandArgs()[10])\n+genome=as.character(commandArgs()[11])\n+##########################################################################################################################################\n+\n+\n+\n+##Read data###############################################################################################################################\n+bedfile<-read.table(bed,header=FALSE,stringsAsFactors=FALSE)\n+wunknown<-which(bedfile$V4=="unknown")\n+bedfile$V4[wunknown]<-paste("unknown",seq(1,length(wunknown),1),sep="")\n+bedfile$V4<-gsub("/","-",bedfile$V4)\n+covdata<-readLines(cov,warn=FALSE)\n+\n+xmldata<-readLines(xml,warn=FALSE)\n+nbrline<-xmldata[grep("<NumberReads>",xmldata)]\n+rlenline<-xmldata[grep("<ReadLength>",xmldata)]\n+nbreads<-as.numeric(strsplit(strsplit(nbrline,">")[[1]][2],"<")[[1]][1])\n+rlength<-as.numeric(strsplit(strsplit(rlenline,">")[[1]][2],"<")[[1]][1])\n+\n+expect<-0\n+allchr<-levels(as.factor(bedfile$V1))\n+if(chrinfo!="none"){\n+ cinfo<-read.table(chrinfo,header=FALSE,stringsAsFactors=FALSE)\n+ gsize<-sum(as.numeric(cinfo[,2]))\n+ expect=(rlength*nbreads)/gsize\n+}\n+\n+dir.create(paste(outdir,"/chromosomes",sep=""),showWarnings=FALSE)\n+for(chr in allchr){dir.create(paste(outdir,"/chromosomes/",chr,sep=""),showWarnings=FALSE)}\n+\n+tcov<-list()\n+tstarts<-numeric(0)\n+tcov0<-character(0)\n+firstt=1\n+for(i in 1:length(covdata)){\n+ if(i%%10000==0){cat(i,"/",length(covdata),"\\n")}\n+ if(nchar(covdata[i])>10){\n+ if(firstt==0){\n+ tcov[[tname]]<-as.numeric(tcov0)\n+ tcov0<-character(0)\n+ }\n+ firstt=0\n+ nameel<-strsplit(covdata[i],"\\t")\n+ tname<-paste(nameel[[1]][1],":",nameel[[1]][2],"-",nameel[[1]][3],sep="")\n+ }\n+ else{tcov0<-c(tcov0,covdata[i])}\n+}\n+##########################################################################################################################################\n+\n+\n+sortchr<-function(x){\n+ if(sum(substr(x,1,3)=="chr")==length(x)){\n+ x0<-strsplit(x,"chr")\n+ xspl<-character(0)\n+ for(i in 1:length(x0)){xspl<-c(xspl,x0[[i]][2])}\n+ xnum<-xspl[!is.na(as.numeric(xspl))]\n+ xchar<-setdiff(xspl,xnum)\n+ xsorted<-paste("chr",c(sort(as.numeric(xnum)),sort(xchar)),sep="")\n+ return(xsorted)\n+ }\n+ else{return(x)}\n+}\n+\n+\n+##Create gene index#######################################################################################################################\n+allchr<-sortchr(levels(as.factor(bedfile$V1)))\n+outfile=paste(outdir,"/chromosomes/chromosomes.html",sep="")\n+cat(file=outfile,paste(\n+ "<html>\\n<head>\\n<title>Index of Target Regions</title>\\n",\n+ "<style type=\\"text/css\\">\\n body{font-family:sans-serif;}\\n h2,h3{color: darkblue;}\\n a{color:darkblue;}\\n table.output td{ padding: 4px; background-color: lightskyblue; border: 1px solid #000; border-color: darkblue; }\\n</style>\\n",\n+ "</head>\\n\\n",\n+ "<script language=\\"JavaScript\\">\\n var questionClass=\\"ChrList\\";\\n function collapseAll(){\\n var allSections=document.getElementsByTagName(\\"div\\");\\n for(i=0;i<allSections.length;i++){\\n if(allSections[i].className==questionClass){\\n allSections[i].style.display = \\"none\\";\\n }}}\\n function expand(name){\\n collapseAll();\\n var newStyle=\\"\\";\\n if(document.getElementById(name).style.display!=\\"block\\"){newStyle=\\"block\\";}\\n else{newStyle=\\"none\\";}\\n document.getElementById(name).style.display=newStyle;\\n }\\n</script>\\n\\n",\n+ "<body onload=\\"expand(\'",allchr[1],"\')\\">\\n<h2>Show Details on Genewise Coverage</h2>",sep=""))\n+\n+for(chr in allchr){\n+ cat(file=outfile,paste("<a href=\\"javascript:expand(\'",chr,"\')\\">",chr,"</a>\\n",sep=""),append=TRUE)\n+}\n+cat'..b'own"){genelab="unknown"}\n+ else{genelab=gene}\n+ cat(file=outfile,paste("<tr><td>",genelab,"</td><td>",tname,"</td><td><a href=\\"",chr,"/",gene,"/index.html\\">Show Details</a></td></tr>\\n",sep=""),append=TRUE)\n+ }\n+ cat(file=outfile,"</table>\\n</div>\\n",append=TRUE)\n+\n+}\n+cat(file=outfile,"</body></html>\\n",append=TRUE) \n+##########################################################################################################################################\n+\n+\n+\n+##Create genewise reports#################################################################################################################\n+firstgene=1\n+partest<-cv<-goftest<-numeric(0)\n+genebed<-split(bedfile,bedfile$V4)\n+\n+for(gene in names(genebed)){\n+\n+ thisbed<-genebed[[gene]]\n+ chr=thisbed$V1[1]\n+ \n+ if(substr(gene,1,7)=="unknown"){genelab="unknown"}\n+ else{genelab=gene}\n+\n+ ##Write HTML header\n+ outfile=paste(outdir,"/chromosomes/",chr,"/",gene,"/index.html",sep="")\n+ dir.create(paste(outdir,"/chromosomes/",chr,"/",gene,sep=""),showWarnings=FALSE)\n+ cat(file=outfile,paste("<html>\\n<head>\\n<title>Enrichment Details</title>\\n<style type=\\"text/css\\">\\n body{font-family:sans-serif;}\\n h2,h3{color: darkblue;}\\n a{color:darkblue;}\\n table.output td{ padding: 4px; background-color: lightskyblue; border: 1px solid #000; border-color: darkblue; } table.noborder td{padding: 0px; border: 0px solid #000; border-color: lightskyblue}\\n</style>\\n</head>\\n\\n<body>\\n<h2>Enrichment Details for ",genelab,"</h2>\\n<table class=\\"output\\">\\n<tr><td><b>Target Region</b></td><td><b>Coverage</b></td><td><b>Percentage</b></td><td><b>Enrichment<br/>Factor</b></td><td><b>Target Histogram</b></td><td><b>External Link</b></td></tr>\\n",sep=""))\n+ \n+ for(i in 1:nrow(thisbed)){\n+\n+ start=thisbed$V2[i]\n+ end=thisbed$V3[i]\n+ region=seq(start,end,1)\n+ tname=paste(chr,":",start,"-",end,sep="")\n+ \n+ if(is.element(tname,names(tcov))){\n+ basecov=tcov[[tname]]\n+ if(expect!=0){enrratio<-round(mean(basecov)/expect,1)}\n+ else{enrratio<-"unknown"}\n+ stddev=round(sd(basecov),2)\n+\n+ ##Create plots\n+ png(file=paste(outdir,"/chromosomes/",chr,"/",gene,"/h_",tname,".png",sep=""))\n+ plot(region,basecov,pch=".",xlab=paste("Physical Position [",chr,"]",sep=""),ylab="Coverage",col="tomato3")\n+ edgesx<-c(region,end,start)\n+ edgesy<-c(basecov,0,0)\n+ polygon(edgesx,edgesy,col="tomato3",border=NA)\n+ lines(c(start,start),c(-1000,1000000))\n+ lines(c(end,end),c(-1000,1000000))\n+ lines(c(start,end),c(mean(basecov),mean(basecov)),col="darkblue")\n+ lines(c(start,end),c(mean(basecov)-stddev,mean(basecov)-stddev),lty="dashed",col="darkblue")\n+ lines(c(start,end),c(mean(basecov)+stddev,mean(basecov)+stddev),lty="dashed",col="darkblue")\n+ dev.off()\n+\n+ ##Write HTML table\n+ ucsclink<-paste("http://www.genome.ucsc.edu/cgi-bin/hgTracks?&db=",genome,"&position=",chr,"%3A",start,"-",end,"&hgt.suggest=&pix=800&Submit=submit&hgsid=183341879",sep="")\n+ cat(file=outfile,paste("<tr><td><b>",tname,"</b><br/>(",end-start+1," bp)</td><td><table class=\\"noborder\\"><tr><td><b>Mean:</b></td><td>",thisbed[i,5],"</td></tr><tr><td><b>Std Dev:</b></td><td>",stddev,"</td></tr></table></td><td><table class=\\"noborder\\"><tr><td><b>1x:</b></td><td>",thisbed[i,6],"%</td></tr><tr><td><b>5x:</b></td><td>",thisbed[i,7],"%</td></tr><tr><td><b>10x:</b></td><td>",thisbed[i,8],"%</td></tr><tr><td><b>20x:</b></td><td>",thisbed[i,9],"%</td></tr><tr><td><b>30x:</b></td><td>",thisbed[i,10],"%</td></tr></table></td><td>",enrratio,"</td><td><a href=\\"h_",tname,".png\\"><img src=\\"h_",tname,".png\\" width=160></img></a></td><td><a href=\\"",ucsclink,"\\">Show in Genome Browser</td></tr>\\n",sep=""),append=TRUE)\n+ }\n+ }\n+ cat(file=outfile,"</table>\\n</body>\\n</html>",append=TRUE)\n+\n+}\n+##########################################################################################################################################\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/R/eval_enrichment.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/R/eval_enrichment.R Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,401 @@\n+#!/usr/bin/Rscript\n+\n+xmlfile=as.character(commandArgs()[6])\n+bedfile=as.character(commandArgs()[7])\n+outdir=as.character(commandArgs()[8])\n+genome=as.character(commandArgs()[9])\n+poor=as.numeric(commandArgs()[10])\n+high=as.numeric(commandArgs()[11])\n+samplename=as.character(commandArgs()[12])\n+targetfile=as.character(commandArgs()[13])\n+details=as.numeric(commandArgs()[14])\n+cutoff=0\n+sdetails=""\n+#samplename0=strsplit(strsplit(xmlfile,"_")[[1]][1],"/")[[1]]\n+#samplename<-samplename0[length(samplename0)]\n+outfile=paste(outdir,"/",samplename,"_enrichment.html",sep="")\n+\n+##Read XML summary\n+cat("Reading XML file ... ")\n+xmltag<-function(line){\n+\treturn(strsplit(strsplit(line,">")[[1]][2],"</")[[1]][1])\n+}\n+xml<-readLines(xmlfile)\n+numreads<-numeric(0)\n+nextfold=0\n+for(line in xml){\n+ if(length(grep("ReadLength",line)>0)){\n+ readlength<-as.numeric(xmltag(line))\n+ }\n+ if(length(grep("NumberReads",line)>0)){\n+ numreads<-c(numreads,as.numeric(xmltag(line)))\n+ }\n+ if(length(grep("AvTargetCoverage",line)>0)){\n+ averagecov=as.numeric(xmltag(line))\n+ }\n+ if(details==1){\n+\tsdetails="<a href=\\"chromosomes/chromosomes.html\\">[Show Details]</a><br/>"\n+ }\n+ if(length(grep("SDTargetCoverage",line)>0)){\n+ stddevcov=as.numeric(xmltag(line))\n+ }\n+ if(length(grep("TargetSize",line)>0)){\n+ targetsize=as.numeric(xmltag(line))\n+ }\n+ if(length(grep("<from1x>",line)>0)){nextfold=1}\n+ else{\n+ if((nextfold==1) && length(grep("PercBases",line))>0){\n+ sample1<-as.numeric(xmltag(line))\n+ nextfold=0\n+ }\n+ }\n+ if(length(grep("<from5x>",line)>0)){nextfold=5}\n+ else{\n+ if((nextfold==5) && length(grep("PercBases",line))>0){\n+ sample5<-as.numeric(xmltag(line))\n+ nextfold=0\n+ }\n+ }\n+ if(length(grep("<from10x>",line)>0)){nextfold=10}\t\n+ else{\n+ if((nextfold==10) && length(grep("PercBases",line))>0){\n+ sample10<-as.numeric(xmltag(line))\n+ nextfold=0\n+ }\n+ }\n+ if(length(grep("<from20x>",line)>0)){nextfold=20}\n+ else{\n+ if((nextfold==20) && length(grep("PercBases",line))>0){\n+ sample20<-as.numeric(xmltag(line))\n+ nextfold=0\n+ }\n+ }\n+ if(length(grep("<from30x>",line)>0)){nextfold=30}\n+ else{\n+ if((nextfold==30) && length(grep("PercBases",line))>0){\n+ \n+ sample30<-as.numeric(xmltag(line))\n+ nextfold=0\n+ }\n+ }\n+}\n+\n+numreads_total<-numreads[1]\n+numreads_target<-numreads[3]\n+tpkm=round(numreads_target/((targetsize/1000)*(numreads_total/1000000)),2)\n+\n+cat("ready.\\n")\n+\n+\n+##Read BED enrichment file and summarize output\n+cat("Reading BED file ... ")\n+bed<-read.table(bedfile,stringsAsFactors=FALSE)\n+area0_2<-sum(bed$V5<2)\n+area2_10<-sum((bed$V5>=2) & (bed$V5<10))\n+area10_20<-sum((bed$V5>=10) & (bed$V5<20))\n+area20_30<-sum((bed$V5>=20) & (bed$V5<30))\n+area30_50<-sum((bed$V5>=30) & (bed$V5<50))\n+area50_100<-sum((bed$V5>=50) & (bed$V5<100))\n+areagr100<-sum(bed$V5>100)\n+cat("ready.\\n")\n+\n+\n+##Create pieplot\n+cat("Creating coverage pieplot ... ")\n+png(file=paste(outdir,"/plots/",samplename,"_pieplot.png",sep=""),width=580)\n+par(mar=c(1,7,1,7))\n+pie(c(area0_2,area2_10,area10_20,area20_30,area30_50,area50_100,areagr100),\n+ labels=c(paste("0x to 2x (",area0_2,")",sep=""),\n+ paste("2x to 10x (",area2_10,")",sep=""),\n+ paste("10x to 20x (",area10_20,")",sep=""),\n+ paste("20x to 30x (",area20_30,")",sep=""),\n+ paste("30x to 50x (",area30_50,")",sep=""),\n+ paste("50x to 100x (",area50_100,")",sep=""),\n+ paste("above 100x (",areagr100,")",sep="")),\n+ col=c("gray30","gray40","gray50","gray60","gray70","gray80","gray90"),main="") ##Mean Coverage of Target Regions")\n+garbage<-dev.off()\n+cat("ready.\\n")\n+\n+\n+cat("Preparing coverage barplots ... ")\n+maxgenemean=0\n+genes<-levels(as.factor(bed$V4))\n+genes<-genes[genes!="unknown"]\n+ngenes<-length(genes)\n+\n+for(i in 1:ngenes){\n+ genemean<-mean(bed[bed$V4==genes[i],5])\n+ if(maxgenemean<genemean){maxgenemean=genemean}\n+}\n+\n+maxgenemean=maxgenemean-(maxgenemean%%1'..b'></td><td>",sample10,"</td></tr>\\n",\n+ " <tr><td><b>Covered 20x</b></td><td>",sample20,"</td></tr>\\n",\n+ " <tr><td><b>Covered 30x</b></td><td>",sample30,"</td></tr>\\n",\n+ " <tr><td><b>TPKM</b></td><td>",tpkm,"</td></tr>\\n",\n+ "</table>\\n",\n+ "</td>\\n",\n+ "<td width=\\"10%\\"></td>",\n+ "<td>\\n",\n+ "<img src=\\"plots/",samplename,"_pieplot.png\\"></img>\\n",\n+ "</td>\\n",\n+ "</tr>\\n",\n+ "</table>\\n",\n+ "<br/>\\n",\n+ "<h2>Genewise Target Coverage</h2>",sdetails,"<br/>\\n",sep=""))\n+ \n+\n+if(ngenes>=2000){\n+for(chromosome in chromosomes){\n+ cat(file=outfile,paste("<a href=\\"javascript:expand(\'",chromosome,"\')\\">",chromosome,"</a>\\n",sep=""),append=TRUE)\n+}\n+for(chromosome in chromosomes){\n+ cat(file=outfile,paste("<div style=\\"height:480px; overflow:auto;\\" class=\\"chrView\\" id=\\"",chromosome,"\\"><img src=\\"plots/",samplename,"_target_coverage_",chromosome,".png\\"></img></div>\\n",sep=""),append=TRUE)\n+}\n+} else{\n+ cat(file=outfile,paste("<div style=\\"height:480px; overflow:auto;\\"><img src=\\"plots/",samplename,"_target_coverage.png\\"></img></div>\\n",sep=""),append=TRUE)\n+}\n+\n+cat(file=outfile,paste("<br/><br/>\\n",\n+ "<h2>Poorly Covered Genes (Cutoff: ",poor,"x)</h2>\\n",sep=""),append=TRUE)\n+if(nrow(poorly_covered)==0){\n+\tcat(file=outfile,"<p>Nothing found for this cutoff.</p>",append=TRUE)\n+} else{\n+cat(file=outfile,paste(\n+ "<table class=\\"output\\">\\n",\n+ " <tr>\\n",\n+ " <td><b>Region</b></td><td><b>Gene</b></td>\\n",\n+ " <td><b>Coverage Mean</b></td>\\n",\n+ " <td><b>Covered 1x</b></td><td><b>Covered 5x</b></td>\\n",\n+ " <td><b>Covered 10x</b></td><td><b>Covered 20x</b></td>\\n",\n+ " <td><b>Covered 30x</b></td><td><b>External Link</b></td>\\n",\n+ " </tr>\\n",sep=""),append=TRUE)\n+\n+for(i in 1:nrow(poorly_covered)){\n+cat(file=outfile,paste(\n+ " <tr>\\n",\n+ " <td>",poorly_covered[i,1],":",poorly_covered[i,2],"-",poorly_covered[i,3],"</td>\\n",\n+ " <td>",poorly_covered[i,4],"</td>\\n",\n+ " <td>",poorly_covered[i,5],"</td>\\n",\n+ " <td>",poorly_covered[i,7],"</td>\\n",\n+ " <td>",poorly_covered[i,8],"</td>\\n",\n+ " <td>",poorly_covered[i,9],"</td>\\n",\n+ " <td>",poorly_covered[i,10],"</td>\\n",\n+ " <td>",poorly_covered[i,11],"</td>\\n",\n+ " <td><a href=\\"",linkpoor[i],"\\">Show in Genome Browser</a></td>\\n",\n+ " </tr>\\n",sep=""),append=TRUE)\n+}\n+\n+cat(file=outfile,"</table><br/>\\n",append=TRUE)\n+}\n+\n+cat(file=outfile,paste("<h2>Highly Covered Genes (Cutoff: ",high,"x)</h2>\\n",sep=""),append=TRUE)\n+if(nrow(highly_covered)==0){\n+ cat(file=outfile,"<p>Nothing found for this cutoff.</p>",append=TRUE)\n+} else{\n+cat(file=outfile,paste(\n+ "<table class=\\"output\\">\\n",\n+ " <tr>\\n",\n+ " <td><b>Target</b></td><td><b>Gene</b></td><td><b>Coverage Mean</b></td>",\n+ " <td><b>Covered 1x</b></td><td><b>Covered 5x</b></td><td><b>Covered 10x</b></td>",\n+ " <td><b>Covered 20x</b></td><td><b>Covered 30x</b></td><td><b>External Link</b></td>\\n",\n+ " </tr>\\n",sep=""),append=TRUE)\n+for(i in 1:nrow(highly_covered)){\n+cat(file=outfile,paste(" <tr>\\n",\n+ " <td>",highly_covered[i,1],":",highly_covered[i,2],"-",highly_covered[i,3],"</td>\\n",\n+ " <td>",highly_covered[i,4],"</td>\\n",\n+ " <td>",highly_covered[i,5],"</td>\\n",\n+ " <td>",highly_covered[i,7],"</td>\\n",\n+ " <td>",highly_covered[i,8],"</td>\\n",\n+ " <td>",highly_covered[i,9],"</td>\\n",\n+ " <td>",highly_covered[i,10],"</td>\\n",\n+ " <td>",highly_covered[i,11],"</td>\\n",\n+ " <td><a href=\\"",linkhigh[i],"\\">Show in Genome Browser</a></td>\\n",\n+ " </tr>",sep=""),append=TRUE)\n+}\n+\n+cat(file=outfile,"</table>\\n",append=TRUE)\n+}\n+cat(file=outfile,"<br/>BED file used for specification of target regions:<br/>",targetfile,append=TRUE)\n+cat(file=outfile,"</body>\\n</html>\\n",append=TRUE)\n+\n+cat("ready.\\n")\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/R/summarize_enrichment.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/R/summarize_enrichment.R Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,223 @@\n+#!/usr/bin/Rscript\n+\n+infile=as.character(commandArgs()[6])\n+outdir=as.character(commandArgs()[7])\n+poor=as.numeric(commandArgs()[8])\n+high=as.numeric(commandArgs()[9])\n+\n+\n+outfile=paste(outdir,"/summary.html",sep="")\n+cutoff=c(poor,high)\n+\n+xmlfiles<-bedfiles<-character(0)\n+indirs<-as.character(readLines(infile))\n+for(thisdir in indirs){\n+ thisdir=paste(thisdir,"/data",sep="")\n+ xmlfiles=c(xmlfiles,list.files(thisdir,pattern=".xml",full.names=TRUE))\n+ bedfiles=c(bedfiles,list.files(thisdir,pattern=".bed",full.names=TRUE))\n+}\n+nsamples<-length(indirs)\n+\n+samplenames<-character(0)\n+diffs<-matrix(nrow=5,ncol=nsamples)\n+averagecov<-stddevcov<-targetsize<-numreads_total<-numreads_target<-numeric(0)\n+sample1<-sample5<-sample10<-sample20<-sample30<-numeric(0)\n+\n+\n+##Read XML input files\n+xmltag<-function(line){\n+ return(strsplit(strsplit(line,">")[[1]][2],"</")[[1]][1])\n+}\n+i=1\n+nextfold=0\n+for(file in xmlfiles){\n+ numreads<-numeric(0)\n+ inlines<-readLines(file)\n+ for(line in inlines){\n+ if(length(grep("SampleName",line)>0)){samplenames<-c(samplenames,xmltag(line))}\n+ if(length(grep("NumberReads",line)>0)){numreads<-c(numreads,as.numeric(xmltag(line)))}\n+ if(length(grep("AvTargetCoverage",line)>0)){averagecov=c(averagecov,as.numeric(xmltag(line)))}\n+ if(length(grep("SDTargetCoverage",line)>0)){stddevcov=c(stddevcov,as.numeric(xmltag(line)))}\n+ if(length(grep("TargetSize",line)>0)){targetsize=as.numeric(xmltag(line))}\n+ if(length(grep("<from1x>",line)>0)){nextfold=1}\n+ else{\n+ if((nextfold==1) && length(grep("PercBases",line))>0){\n+ sample1<-c(sample1,as.numeric(xmltag(line)))\n+ nextfold=0\n+ }\n+ }\n+ if(length(grep("<from5x>",line)>0)){nextfold=5}\n+ else{\n+ if((nextfold==5) && length(grep("PercBases",line))>0){\n+ sample5<-c(sample5,as.numeric(xmltag(line)))\n+ nextfold=0\n+ }\n+ }\n+ if(length(grep("<from10x>",line)>0)){nextfold=10}\t\n+ else{\n+ if((nextfold==10) && length(grep("PercBases",line))>0){\n+ sample10<-c(sample10,as.numeric(xmltag(line)))\n+ nextfold=0\n+ }\n+ }\n+ if(length(grep("<from20x>",line)>0)){nextfold=20}\n+ else{\n+ if((nextfold==20) && length(grep("PercBases",line))>0){\n+ sample20<-c(sample20,as.numeric(xmltag(line)))\n+ nextfold=0\n+ }\n+ }\n+ if(length(grep("<from30x>",line)>0)){nextfold=30}\n+ else{\n+ if((nextfold==30) && length(grep("PercBases",line))>0){\n+ sample30<-c(sample30,as.numeric(xmltag(line)))\n+ nextfold=0\n+ }\n+ }\n+ }\n+ numreads_total<-c(numreads_total,numreads[1])\n+ numreads_target<-c(numreads_target,numreads[2])\n+ diffs[,i]<-c(sample30[i],sample20[i]-sample30[i],sample10[i]-sample20[i],sample5[i]-sample10[i],sample1[i]-sample5[i])\n+ i=i+1\n+}\n+\n+\n+##Create barplot\n+rownames(diffs)<-c("Covered 30x","Covered 20x","Covered 10x","Covered 5x","Covered 1x")\n+plot_samplenames<-samplenames\n+s=0\n+for(sname in plot_samplenames){\n+ s=s+1\n+ if(nchar(sname)>10){plot_samplenames[s]<-paste("Sample ",s,"\\n(table above)",sep="")}\n+}\n+colnames(diffs)<-plot_samplenames\n+png(file=paste(outdir,"/summary_plot.png",sep=""),width=66*(4+nsamples),height=400)\n+par(oma=c(1,0,0,1))\n+barplot(diffs,\n+ \tlegend=TRUE,\n+ col=c("darkblue","steelblue1","tomato1","tomato3","tomato4"),\n+ xlim=c(0,4+nsamples),ylim=c(0,100),\n+ ylab="Percentage",las=2 ) #,\n+# args.legend=list(x=nsamples+4,y=80))\n+dev.off()\n+\n+\n+\n+##Read BED files\n+sametarget=TRUE\n+thisbed<-read.table(bedfiles[1],stringsAsFactors=FALSE)\n+genes<-levels(as.factor(thisbed$V4))\n+meancov<-matrix(nrow=length(genes),ncol=length(bedfiles))\n+chr<-start<-end<-character(0)\n+\n+i=1\n+for(file in bedfiles){\n+ thisbed<-read.table(file,stringsAsFactors=FALSE)\n+ genes_thissample<-levels(as.factor(thisbed$V4))\n+ if(length(genes_thissample)!=length(genes)){sametarget=FALSE}\n+ for(j in 1:length(genes)){\n+ thisgene<-thisbed[thisbed$V4==genes[j],]\n+ chr[j]<-t'..b's)])),4)\n+ meancov$stddev[i]<-round(sd(as.numeric(meancov[i,4+(1:nsamples)])),4)\n+ meancov$mini[i]<-round(min(as.numeric(meancov[i,4+(1:nsamples)])),4)\n+ meancov$maxi[i]<-round(max(as.numeric(meancov[i,4+(1:nsamples)])),4)\n+}\n+meancov_sorted<-meancov[order(meancov$ave),]\n+poorly_all<-meancov_sorted[meancov_sorted$max<cutoff[1],]\n+\n+\n+##Write HTML output\n+cat(file=outfile,paste(\n+ "<html>\\n",\n+ "<head>\\n",\n+ "<title>Enrichment Performance</title>\\n",\n+ "<style type=\\"text/css\\">\\n",\n+ "body{font-family:sans-serif;}\\n",\n+ "h2,h3{color: darkblue;}\\n",\n+ "a{color: darkblue;}\\n",\n+ " table.output td{\\n",\n+ " padding: 4px; background-color: lightskyblue;\\n",\n+ " border: 1px solid #000; border-color: darkblue;\\n",\n+ "}\\n",\n+ "</Style>\\n",\n+ "</head>\\n",\n+ "<body>\\n",\n+ "<h2>Target Enrichment Performance</h2><br/>\\n",\n+ "<table class=\\"output\\">\\n",\n+ " <tr>\\n",\n+ " <td><b>Sample</b></td><td><b># Reads</b></td><td><b># On Target</b></td><td><b>Coverage Mean</b></td><td><b>Coverage Std Dev</b></td><td><b>Covered 1x</b></td><td><b>Covered 5x</b></td><td><b>Covered 10x</b></td><td><b>Covered 20x</b></td><td><b>Covered 30x</b></td><td><b>Details</b></td>\\n",\n+ "</tr>\\n",sep=""))\n+for(i in 1:nsamples){\n+ cat(file=outfile,paste(\n+ "<tr><td>",samplenames[i],"</td><td>",numreads_total[i],"</td>",\n+ "<td>",numreads_target[i],"</td><td>",averagecov[i],"</td>",\n+ "<td>",stddevcov[i],"</td><td>",sample1[i],"</td><td>",sample5[i],"</td>",\n+ "<td>",sample10[i],"</td><td>",sample20[i],"</td><td>",sample30[i],"</td>",\n+ "<td><a href=\\"",rev(strsplit(indirs[i],"/")[[1]])[1],"/",samplenames[i],"_enrichment.html\\">Show</a></td></tr>\\n",\n+ sep=""),append=TRUE)\n+}\n+cat(file=outfile,paste(\n+ "</table>\\n",\n+ "<br/><br/>\\n",\n+ "<h2>Target Base Percentage Covered</h2>\\n",\n+ "<img src=\\"summary_plot.png\\"></img>\\n",sep=""),append=TRUE)\n+if(!sametarget){\n+\twarning("Target regions are not the same for all samples.")\n+} else{\n+cat(file=outfile,paste(\n+ "<h2>Poorly Covered in All Samples (Cutoff: ",cutoff[1],"x)</h2>\\n",sep=""),append=TRUE)\n+if(nrow(poorly_all)==0){\n+cat(file=outfile,"<p>Nothing found for this cutoff.</p>",append=TRUE)\n+} else{\n+cat(file=outfile,paste(\n+ "<table class=\\"output\\">\\n",\n+ "<tr>\\n",\n+ "<td><b>Target Region</b></td><td><b>Gene</b></td><td><b>Mean Across Samples</b></td><td><b>Std Dev Across Samples</b></td>\\n",sep=""),append=TRUE)\n+for(i in 1:nrow(poorly_all)){\n+ cat(file=outfile,paste(\n+ "<tr>\\n",\n+ "<td>",poorly_all$chr[i],":",poorly_all$start[i],"-",poorly_all$end[i],"</td>\\n",\n+ "<td>",poorly_all$genes[i],"</td>\\n",\n+ "<td>",poorly_all$ave[i],"</td>\\n",\n+ "<td>",poorly_all$stddev[i],"</td>\\n",\n+ "<tr>\\n",sep=""),append=TRUE)\n+}\n+cat(file=outfile,"</table>\\n",append=TRUE)\n+}\n+\n+meancov_sorted<-meancov[order(meancov$ave,decreasing=TRUE),] ##Highly Covered\n+highly_all<-meancov_sorted[meancov_sorted$min>cutoff[2],]\n+cat(file=outfile,paste(\n+ "<h2>Highly Covered in All Samples (Cutoff: ",cutoff[2],"x)</h2>\\n",sep=""),append=TRUE)\n+if(nrow(highly_all)==0){\n+cat(file=outfile,"<p>Nothing found for this cutoff.</p>",append=TRUE)\n+} else{\n+\tcat(file=outfile,paste("<table class=\\"output\\">\\n",\n+ "<tr>\\n",\n+ "<td><b>Target Region</b></td><td><b>Gene</b></td><td><b>Mean Across Sample</b></td><td><b>Std Dev Across Samples</b></td>\\n",sep=""),append=TRUE)\n+for(i in 1:nrow(highly_all)){\n+ cat(file=outfile,paste(\n+ "<tr>\\n",\n+ "<td>",highly_all$chr[i],":",highly_all$start[i],"-",highly_all$end[i],"</td>\\n",\n+ "<td>",highly_all$genes[i],"</td>\\n",\n+ "<td>",highly_all$ave[i],"</td>\\n",\n+ "<td>",highly_all$stddev[i],"</td>\\n",\n+ "<tr>\\n",sep=""),append=TRUE)\n+}\n+cat(file=outfile,"</table>\\n",append=TRUE)\n+}\n+\n+}\n+\n+cat(file=outfile,"</body>\\n</html>\\n",append=TRUE)\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/README Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,89 @@ +NGSrich - Version 0.5.4 +Target enrichment performance for next-generation sequencing. + + +Description: +NGSrich is a tool for researchers concerned with target enrichment issues in next-generation sequencing. +It evaluates the target enrichment performance of target regions given in BED format and outputs +summary statistics, visualizations, and some additional files giving details on the analysis. + + +--------------------------------------------------------------------------------------------------------- + + +Usage: +java NGSrich evaluate -r <readsFile> -u <genomeName> -t <target> + [(-a|-g) <annotation>] [ -s <sName> ] [-T <tmpDir>] [ -o <outDir>] [-p <poor> -h <high>][--no-details] + + +The program should be started from the bin directory of the software. +Required arguments: + <readsFile>: Path to the read alignment file in SAM or BAM alignment format + (http://samtools.sourceforge.net/SAM-1.3.pdf) + <genomeName>: UCSC genome version name (e.g. 'hg19'). + <target>: Path to the target file in BED annotation format + (http://genome.ucsc.edu/FAQ/FAQformat.html#format1, 3 columns required) +Optional arguments: + <annotation>: the local path of the annotation of the genome + [default: genome annotation is downloaded from the site of the ucsc genome + browser and placed into the temporary directory of the sample.] + <sName>: Name of the sample being processed - defaults to prefix of <readsFile>. + <tmpDir>: Temporary directory - defaults to '/tmp'. + <outDir>: Output directory - defaults to '<pathToReadsFile>/enrichment'. + <poor>: Coverage cutoff to define poorly covered genes - defaults to 2. + <high>: Coverage cutoff to define highly covered genes - defaults to 200. + --no-details: Represses the computation of the evaluation details. + + +Output: +1. The HTML file contains a report of the target enrichment results including + tables of poorly and highly covered genes (defined by cutoffs <poor> and <high>. + For vizualisation, plots are embedded in this document. The contents of this report + are actually based on an evaluation of the XML and BED files. +2. The XML file contains the summary statistics for the enrichment performance. +3. The BED file contains detailed coverage information for each single region specified in + the input target file. +4. The WIG files (http://genome.ucsc.edu/goldenPath/help/wiggle.html) contain a per-base + description of the coverage on the target regions, one for the target regions specified in + the input target file and one for the whole genome (gaps are skipped). These files can be + used for visualization in a Genome Browser, e.g. at http://genome.ucsc.edu/cgi-bin/hgGateway. + + +--------------------------------------------------------------------------------------------------------- + + +Several enrichment performance reports can be summarized by the command NGSrich-summarize. +This should also be started from the bin directory of the software. + +Usage: java NGSrich summarize -r <inputIndexFile> -o <outDir> [ -p <poor> -h <high> ] + +Required arguments: + <inputIndexFile>: Text file with each line containing the output directory of + the report for one of the samples to be summarized. + <outDir>: Output directory. + +Optional arguments: + <poor>: Coverage cutoff to define poorly covered genes - defaults to 2. + <high>: Coverage cutoff to define highly covered genes - defaults to 200. + + +Output: +The HTML file contains a summary report and summarizing performance statistics for several +target enrichment experiments. For each sample, the detailed performance report can be +accessed by a hyperlink. + + +--------------------------------------------------------------------------------------------------------- + + +Requirements: +The NGSrich software runs only on 64-bit Linux. It requires an installation of R and the Java +Runtime Environment (JRE), which are preinstalled on most Linux distributions. If not, +please visit the official sites for detailed installation instructions. + + +Contact: +You can send an e-mail to the NGSrich mailing list at <NGSrich-users@lists.sourceforge.net>. +Please tell us your experiences with the software itself and the documentation. We particularly welcome new +bug reports and suggestions for new or enhanced features. + |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/DEFAULT.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/DEFAULT.properties Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,10 @@ +! Path of the temporary directory. +tmpDir: /tmp +! Path of the father directory of the output directory. When empty the output directory is placed in the directory containing the reads alignment file. +outDirPath: +! Name of the output directory (not the path). +outDir: enrichment +! Define poorly covered genes. +poor: 2 +! Defines highly covered genes. +high: 200 |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/NGSrich.class |
b |
Binary file NGSrich_0.5.5/bin/NGSrich.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/_main/Enrichment.class |
b |
Binary file NGSrich_0.5.5/bin/_main/Enrichment.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/_main/EnrichmentStatsComputer.class |
b |
Binary file NGSrich_0.5.5/bin/_main/EnrichmentStatsComputer.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/_main/NGSrichEvaluate.class |
b |
Binary file NGSrich_0.5.5/bin/_main/NGSrichEvaluate.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/_main/NGSrichSummarize.class |
b |
Binary file NGSrich_0.5.5/bin/_main/NGSrichSummarize.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/converters/Read2Wig.class |
b |
Binary file NGSrich_0.5.5/bin/converters/Read2Wig.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/converters/ReadOnTarget2Wig.class |
b |
Binary file NGSrich_0.5.5/bin/converters/ReadOnTarget2Wig.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/dataGenerators/AnnotationDataGenerator.class |
b |
Binary file NGSrich_0.5.5/bin/dataGenerators/AnnotationDataGenerator.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/dataGenerators/ReadAlginmentDataGenerator.class |
b |
Binary file NGSrich_0.5.5/bin/dataGenerators/ReadAlginmentDataGenerator.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/dataGenerators/TargetDataGenerator.class |
b |
Binary file NGSrich_0.5.5/bin/dataGenerators/TargetDataGenerator.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/dataGenerators/TestDataGenerator.class |
b |
Binary file NGSrich_0.5.5/bin/dataGenerators/TestDataGenerator.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/AVLNode.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/AVLNode.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/AVLTree.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/AVLTree.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/AnnotationLine.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/AnnotationLine.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/Format.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/Format.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/Frame.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/Frame.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/GenomeFrame.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/GenomeFrame.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/GenomeLine.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/GenomeLine.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/Line.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/Line.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/Read.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/Read.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/ReadFrame.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/ReadFrame.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/ReadLine.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/ReadLine.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/ReducedReadLine.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/ReducedReadLine.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/datastructures/TargetLine.class |
b |
Binary file NGSrich_0.5.5/bin/datastructures/TargetLine.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/ChromosomeException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/ChromosomeException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/ChromosomeFormatException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/ChromosomeFormatException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/ChromosomeMismatchException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/ChromosomeMismatchException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/ChromosomeNotFoundException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/ChromosomeNotFoundException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/FileFormatException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/FileFormatException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/GenomeAnnotationException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/GenomeAnnotationException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/NullOrNegativeRangeException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/NullOrNegativeRangeException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/RangeException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/RangeException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/RangeFormatException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/RangeFormatException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/exceptions/RangeLimitNotFoundException.class |
b |
Binary file NGSrich_0.5.5/bin/exceptions/RangeLimitNotFoundException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/filters/Filter.class |
b |
Binary file NGSrich_0.5.5/bin/filters/Filter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/filters/GenomeFilter.class |
b |
Binary file NGSrich_0.5.5/bin/filters/GenomeFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/filters/ReadFilter.class |
b |
Binary file NGSrich_0.5.5/bin/filters/ReadFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/filters/TargetFilter.class |
b |
Binary file NGSrich_0.5.5/bin/filters/TargetFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/middlewares/GeneExtractor.class |
b |
Binary file NGSrich_0.5.5/bin/middlewares/GeneExtractor.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/middlewares/HitsCounter.class |
b |
Binary file NGSrich_0.5.5/bin/middlewares/HitsCounter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/middlewares/Misc.class |
b |
Binary file NGSrich_0.5.5/bin/middlewares/Misc.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/middlewares/ReadCounter.class |
b |
Binary file NGSrich_0.5.5/bin/middlewares/ReadCounter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/middlewares/XMLSummaryFileBuilder.class |
b |
Binary file NGSrich_0.5.5/bin/middlewares/XMLSummaryFileBuilder.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Attribute.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Attribute.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/AttributeList.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/AttributeList.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/CDATA.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/CDATA.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Comment.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Comment.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Content.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Content.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/ContentList$FilterList.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/ContentList$FilterList.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/ContentList$FilterListIterator.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/ContentList$FilterListIterator.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/ContentList.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/ContentList.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/DataConversionException.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/DataConversionException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/DefaultJDOMFactory.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/DefaultJDOMFactory.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/DescendantIterator.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/DescendantIterator.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/DocType.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/DocType.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Document.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Document.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Element.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Element.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/EntityRef.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/EntityRef.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/FilterIterator.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/FilterIterator.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/IllegalAddException.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/IllegalAddException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/IllegalDataException.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/IllegalDataException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/IllegalNameException.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/IllegalNameException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/IllegalTargetException.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/IllegalTargetException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/JDOMException.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/JDOMException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/JDOMFactory.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/JDOMFactory.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Namespace.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Namespace.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/NamespaceKey.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/NamespaceKey.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Parent.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Parent.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/ProcessingInstruction.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/ProcessingInstruction.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Text.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Text.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/UncheckedJDOMFactory.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/UncheckedJDOMFactory.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/Verifier.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/Verifier.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/AbstractDOMAdapter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/adapters/AbstractDOMAdapter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/CrimsonDOMAdapter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/adapters/CrimsonDOMAdapter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/DOMAdapter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/adapters/DOMAdapter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/JAXPDOMAdapter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/adapters/JAXPDOMAdapter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/OracleV1DOMAdapter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/adapters/OracleV1DOMAdapter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/OracleV2DOMAdapter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/adapters/OracleV2DOMAdapter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/XML4JDOMAdapter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/adapters/XML4JDOMAdapter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/XercesDOMAdapter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/adapters/XercesDOMAdapter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/adapters/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/org/jdom/adapters/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,7 @@ +<body> + +Classes to interface with various DOM implementations. Not generally +needed except in truly advanced situations. JAXPDOMAdapter is most commonly +used. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/filter/AbstractFilter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/filter/AbstractFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/filter/AndFilter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/filter/AndFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/filter/ContentFilter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/filter/ContentFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/filter/ElementFilter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/filter/ElementFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/filter/Filter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/filter/Filter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/filter/NegateFilter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/filter/NegateFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/filter/OrFilter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/filter/OrFilter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/filter/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/org/jdom/filter/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,9 @@ +<body> + +Classes to programmatically filter nodes of a document based on type, name, +value, or other aspects and to boolean and/or/negate these rules. Filters can +be used in methods like getContent(Filter) and getDescendants(Filter). A +sampling of generally useful filters are provided here. Alternate filters can +be user defined. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/input/BuilderErrorHandler.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/input/BuilderErrorHandler.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/input/DOMBuilder.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/input/DOMBuilder.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/input/JAXPParserFactory.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/input/JAXPParserFactory.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/input/JDOMParseException.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/input/JDOMParseException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/input/SAXBuilder.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/input/SAXBuilder.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/input/SAXHandler.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/input/SAXHandler.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/input/TextBuffer.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/input/TextBuffer.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/input/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/org/jdom/input/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,10 @@ +<body> + +Classes to build JDOM documents from various sources. The most common builder +class is SAXBuilder which constructs a JDOM document using a SAX parser and +can pull content from files, streams, sockets, readers, and so on. It can use +any underlying SAX parser to handle the parsing chores. SAXHandler provides +support for SAXBuilder. DOMBuilder lets you build from a pre-existing DOM +tree. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/DOMOutputter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/DOMOutputter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/EscapeStrategy.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/EscapeStrategy.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/Format$DefaultEscapeStrategy.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/Format$DefaultEscapeStrategy.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/Format$TextMode.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/Format$TextMode.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/Format.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/Format.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/JDOMLocator.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/JDOMLocator.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/NamespaceStack.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/NamespaceStack.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/SAXOutputter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/SAXOutputter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/XMLOutputter$NamespaceStack.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/XMLOutputter$NamespaceStack.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/XMLOutputter.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/output/XMLOutputter.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/output/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/org/jdom/output/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,15 @@ +<body> + +Classes to output JDOM documents to various destinations. The most common +outputter class is XMLOutputter which outputs a document (or part of a +document) as a stream of bytes. Format and EscapeStrategy support the +XMLOutputter in letting you choose how the output should be formatted and how +special characters should be escaped. + +SAXOutputter lets you output as a stream of SAX events (handy especially in +transformations). JDOMLocator supports SAXOutputter and helps you observe the +SAX output process. + +DOMOutputter lets you output a JDOM document as a DOM tree. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/org/jdom/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,13 @@ +<body> + +Classes to represent the components of an XML document. The Verifier is a +special class useful in ensuring well-formedness of documents. The Parent +interface is implemented by Document and Element exposing their commonality. +The Content abstract class is extended by all the node types of a document +except Document itself. + +The JDOMFactory interface and DefaultJDOMFactory standard implementation +provide advanced users with the ability to create subtypes of the org.jdom +classes. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult$DocumentBuilder.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult$DocumentBuilder.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult$FragmentHandler.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult$FragmentHandler.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/transform/JDOMResult.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource$DocumentReader.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource$DocumentReader.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource$JDOMInputSource.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource$JDOMInputSource.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/transform/JDOMSource.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/XSLTransformException.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/transform/XSLTransformException.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/XSLTransformer.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/transform/XSLTransformer.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/transform/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/org/jdom/transform/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,8 @@ +<body> + +Classes to help with transformations, based on the JAXP TrAX classes. +JDOMTransformer supports simple transformations with one line of code. +Advanced features are available with the JDOMSource and JDOMResult classes +that interface with TrAX. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/xpath/XPath$XPathString.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/xpath/XPath$XPathString.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/xpath/XPath.class |
b |
Binary file NGSrich_0.5.5/bin/org/jdom/xpath/XPath.class has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/org/jdom/xpath/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/org/jdom/xpath/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,6 @@ +<body> + +Support for XPath from within JDOM. XPath provides a common interface with a +pluggable back-end. The default back end is Jaxen. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/bin/xmlFilePattern.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/bin/xmlFilePattern.xml Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,62 @@ +<?xml version="1.0" ?> +<SampleSet> + <NumberSamples>1</NumberSamples> + <Sample> + <SampleName>name</SampleName> + <ReadLength>0</ReadLength> + <NumberReads>0</NumberReads> + <TargetSize>0</TargetSize> + <AvTargetCoverage>0</AvTargetCoverage> + <SDTargetCoverage>0</SDTargetCoverage> + <ReadsOnTarget> + <OnTarget> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </OnTarget> + <Plus100> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </Plus100> + <Plus200> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </Plus200> + </ReadsOnTarget> + <ReadsOverlappingTarget> + <OnTarget> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </OnTarget> + <Plus100> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </Plus100> + <Plus200> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </Plus200> + </ReadsOverlappingTarget> + <TargetCovered> + <from1x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from1x> + <from5x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from5x> + <from10x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from10x> + <from20x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from20x> + <from30x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from30x> + </TargetCovered> + </Sample> +</SampleSet> \ No newline at end of file |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/DEFAULT.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/DEFAULT.properties Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,10 @@ +! Path of the temporary directory. +tmpDir: /tmp +! Path of the father directory of the output directory. When empty the output directory is placed in the directory containing the reads alignment file. +outDirPath: +! Name of the output directory (not the path). +outDir: enrichment +! Define poorly covered genes. +poor: 2 +! Defines highly covered genes. +high: 200 |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/NGSrich.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/NGSrich.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,58 @@ +import java.io.IOException; + +import _main.NGSrichEvaluate; +import _main.NGSrichSummarize; +import exceptions.FileFormatException; + +/** + * This is the main class. + * + * @author Peter Frommolt + * @author Ali Abdallah + */ + +public class NGSrich { + + /** + * Self Explanatory. + * + * @param args an Array of argument. The first argument is command and the + * other arguments are its options. + * + * @throws FileFormatException if the used files have formally a bad format. + * @throws IOException + * @throws InterruptedException + */ + public static void main(String[] args) throws FileFormatException, + IOException, InterruptedException { + + String usagestr = + "\nThis is NGSrich, version 0.5.4.\n\n" + + "Usage: java NGSrich [command] [options]\n\n" + + "\tCommands:\n" + + "\tevaluate" + + "\tEvaluate target enrichment for a single sample.\n" + + "\tsummarize" + + "\tCreate a summary report for several evaluations.\n"; + + int alen = args.length; + if (alen == 0) { + System.out.println(usagestr); + System.exit(0); + } else { + String[] cparams = new String[alen - 1]; + for (int i = 0; i < alen - 1; i = i + 1) { + cparams[i] = args[i + 1]; + } + String eval = "evaluate", summ = "summarize"; + if (eval.equals(args[0])) { + // Geändert von AA 27.07.2011. + new NGSrichEvaluate(cparams).evaluate(); + } + if (summ.equals(args[0])) { + // Geändert von AA 27.07.2011. + new NGSrichSummarize(cparams).summarize(); + } + } + } +} \ No newline at end of file |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/_main/Enrichment.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/_main/Enrichment.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,490 @@\n+package _main;\n+\n+import java.io.File;\n+import java.io.FileWriter;\n+import java.io.IOException;\n+import java.sql.Time;\n+import java.util.Scanner;\n+\n+import middlewares.Misc;\n+import converters.Read2Wig;\n+import converters.ReadOnTarget2Wig;\n+import exceptions.ChromosomeFormatException;\n+import exceptions.ChromosomeMismatchException;\n+import exceptions.ChromosomeNotFoundException;\n+import exceptions.FileFormatException;\n+import exceptions.GenomeAnnotationException;\n+import exceptions.NullOrNegativeRangeException;\n+import exceptions.RangeFormatException;\n+import exceptions.RangeLimitNotFoundException;\n+import filters.Filter;\n+import filters.GenomeFilter;\n+import filters.ReadFilter;\n+import filters.TargetFilter;\n+\n+/**\n+ * This is a scheduler for the phases of the evaluation.\n+ * \n+ * @author Ali Abdallah\n+ * @version 19.03.2011\n+ * @since jdk 1.6\n+ */\n+\n+public class Enrichment {\n+\t\n+\tString \n+\t/**\n+\t * The name of the read alignment file.\n+\t */\n+\treadFileName, \n+\t/**\n+\t * the name of the genome annotation file.\n+\t */\n+\tgenomeFName, \n+\t/**\n+\t * the ucsc-name of the genome (e.g. hg19).\n+\t */\n+\tgenomeName, \n+\t/**\n+\t * the name of the file of the targeted regions.\n+\t */\n+\ttargetFName, \n+\t/**\n+\t * the temporary directory.\n+\t */\n+\ttmpDir,\n+\t/**\n+\t * the output directory.\n+\t */\n+\toutDir,\n+\t/**\n+\t * the xml summary file containing various overall statistics.\n+\t */\n+\txmlSummaryFile, \n+\t/**\n+\t * the name of the detailed coverage data file.\n+\t */\n+\tdetailsFileName, \n+\t/**\n+\t * the .bed file containing target-level coverage statistics data. \n+\t */\n+\tbeddetailsFileName,\n+\t/**\n+\t * the process number used for unique naming.\n+\t */\n+\tproc, \n+\t/**\n+\t * the name of the read alignment file without extension.\n+\t */\n+\tprefix, \n+\t/**\n+\t * the extension of the read alignment file.\n+\t */\n+\tsuffix,\n+\t/**\n+\t * The name of the read alignment file after the reduction.\n+\t */\n+\tareadFileName, \n+\t/**\n+\t * The name of the genome annotation file after the reduction.\n+\t */\n+\taGenomeFName, \n+\t/**\n+\t * the name of the file of the targeted regions after the reduction.\n+\t */\n+\taTargetFName;\n+\tint \n+\t/**\n+\t * Cutoff for poor coverage [default: 2].\n+\t * \n+\t */\n+\tpoor, \n+\t/**\n+\t * Cutoff for high coverage [default: 200].\n+\t */\n+\thigh,\n+\tdetails;\n+\n+\t/**\n+\t * Construcs an enrichment object and initializes the evaluation parameters.\n+\t * @param args the list of all evaluation parameters.\n+\t */\n+\tpublic Enrichment(String... args) {\n+\t\treadFileName = args[0];\n+\t\tgenomeName = args[8];\n+\t\ttargetFName = args[2];\n+\t\tif (!targetFName.endsWith("bed")) {\n+\t\t\tSystem.out.println("WARNING: Target file: " + targetFName + " must be in the bed format.");\n+\t\t}\n+\t\tif (args.length > 3) {\n+\t\t\tTime time = new Time(System.currentTimeMillis());\n+\t\t\tString nano = ""+System.nanoTime();\n+\t\t\t\n+\t\t\ttmpDir = args[3] + Misc.slash(args[3]) +"Sample_From_"+\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttime.getHours()+"_"+\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttime.getMinutes()+"_"+\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttime.getSeconds()+"_"+nano+ "/";\n+\t\t\tnew File(tmpDir).mkdir();\n+\t\t\tnew File(tmpDir).setReadable(true);\n+\t\t\tnew File(tmpDir).setWritable(true);\n+\t\t\toutDir = args[4] + Misc.slash(args[4]);\n+\n+\t\t\tif (!(new File(tmpDir).isDirectory()) && new File(tmpDir).exists()) {\n+\t\t\t\tSystem.out.println("File " + tmpDir\n+\t\t\t\t\t\t+ " is not a directory.\\nProgram stopped.");\n+\t\t\t\tSystem.exit(0);\n+\t\t\t} else if (!(new File(tmpDir).exists())) {\n+\t\t\t\tSystem.out.println("File " + tmpDir\n+\t\t\t\t\t\t+ " not found.\\nProgram stopped.");\n+\t\t\t\tSystem.exit(0);\n+\t\t\t}\n+\t\t}\n+\t\tif (args.length > 5) {\n+\t\t\ttry {\n+\t\t\t\tpoor = Integer.parseInt(args[5]);\n+\t\t\t\thigh = Integer.parseInt(args[6]);\n+\t\t\t} catch (NumberFormatException nfe) {\n+\t\t\t\tSystem.out\n+\t\t\t\t\t\t.println("Warning: poor or high must be integers.\\n<poor> and <high> are set to the standard values.");\n+\t\t\t\tpoor = 2;\n+\t\t\t\thigh = 200;\n+\t\t\t}\n+\t\t} else {\n+\t\t\tpoor = 2;\n+\t\t\thigh = 200;\n+\t\t}\n+\t\t\n+\t\tgenomeFName = (args[1].equals("none"))?downloadGenomeAnnotation():args[1];\n+\t\t\n+\t\tprefix = Misc.prefix(readFileName);\n+\t\tif (args[7] != "'..b'hrInfoPath);\n+\t\t\t\tscript = Misc.scriptDir() + Misc.slash(Misc.scriptDir())+"R/eval_details.R";\n+ outDirR = (lastSlash == outDir.length() - 1) ? outDir.substring(0, lastSlash) : outDir;\n+ \n+ String call2 = \t"Rscript "+ script + " " + xmlSummaryFile + " " + beddetailsFileName \n+\t\t\t\t\t\t\t+ " " + detailsFileName + " " + chrInfoPath + " " + outDirR + " " \n+\t\t\t\t\t\t\t+ genomeName;\n+ Process p2 = rt.exec(call2);\n+ stdout=new Scanner(p2.getInputStream());\n+ stderr=new Scanner(p2.getErrorStream());\n+ \n+ while(stdout.hasNextLine()){System.out.println(stdout.nextLine());}\n+ while(stderr.hasNextLine()){System.out.println(stderr.nextLine());}\n+ stdout.close(); stderr.close();\n+\t\t\t}\n+ \n+\t\t\tString path = outDir+prefix+"_enrichment.html";\n+\t\t\tSystem.out.println("Created plots and HTML summary report");\n+\t\t\tif (new File(path).exists()) {\n+\t\t\t System.out.println("\\nSTEP 3 successfully completed");\n+\t\t\t} else {\n+\t\t\t System.out.println("HTML FILE " + path + " not found");\n+\t\t\t System.out.println("\\nSTEP 3 unsuccessful");\n+\t\t\t}\n+\t\t}\n+\t\tcatch (IOException e) {\n+\t\t\te.printStackTrace();\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * This is the fourth phase. In this phase the detailed datta from phase 2\n+\t * are converted to the wiggle format. The method uses a ReadOnTarget2Wig\n+\t * object to accomplish this task.\n+\t * \n+\t */\n+\tpublic void computeWiggleFile() {\n+\t\ttry {\n+\t\t\tSystem.out.println("Computing wiggle file for on-target reads");\n+\t\t\tif (!new File(detailsFileName).exists())\n+\t\t\t\tdetailsFileName = tmpDir + new File(detailsFileName).getName();\n+\t\t\t\n+\t\t\tnew ReadOnTarget2Wig(detailsFileName, prefix, outDir + "data", \n+\t\t\t\t\tMisc.prefix(readFileName)+ "\\nonTarget");\n+\t\t\tSystem.out.println("Wiggle file for on-target reads created");\n+\t\t\tSystem.out.println("Output written to " + outDir + "data/" + prefix + "_onTarget.wig");\n+\t\t\tFile[] outputFiles = new File(outDir + "data/")\n+\t\t\t\t\t.listFiles();\n+\t\t\tfor (int i = 0; i < outputFiles.length; i++) {\n+\t\t\t\tif (outputFiles[i].getName().endsWith("wig")\n+\t\t\t\t\t\t&& outputFiles[i].getName().startsWith(\n+\t\t\t\t\t\t\t\tdetailsFileName.substring(\n+\t\t\t\t\t\t\t\t\tdetailsFileName.lastIndexOf("/") + 1,\n+\t\t\t\t\t\t\t\t\t\tdetailsFileName.lastIndexOf(".")))) {\n+\t\t\t\t\tFile f = new File(outDir + "data"\n+\t\t\t\t\t\t\t+ "/" + Misc.prefix(readFileName) + "_onTarget.wig");\n+\t\t\t\t\toutputFiles[i].renameTo(f);\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\tif (new File(outDir+"data/"+prefix+"_onTarget.wig").exists()){\n+\t\t\t\tSystem.out.println("\\nSTEP 4 successfully completed.");\n+\t\t\t} else {\n+\t\t\t\tSystem.out.println(outDir+"data/"+ prefix\n+\t\t\t\t\t\t+ "_onTarget.wig not found!\\n\\nSTEP 4 unsuccessful");\n+\t\t\t}\n+\t\t} catch (IOException e) {\n+\t\t\tSystem.err.println("Target conversion in Wig unsuccessful");\n+\t\t\te.printStackTrace();\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * This is the fifth and last phase of the evaluation process. In contrast\n+\t * to the fourth phase, this method uses a Read2Wig object to convert the\n+\t * detailed data for all reads (and not only for reads on targets) to the\n+\t * wiggle format.\n+\t * \n+\t */\n+\tvoid computeOverallWiggleFile() {\n+\t\ttry {\n+\t\t\tSystem.out.println("Computing wiggle file for all reads");\n+\t\t\tnew Read2Wig(areadFileName, prefix, outDir + "data", \n+\t\t\t\t\t\t\t\t\t\t\t\t\t\tgenomeFName, tmpDir);\n+\t\t\tString overallWiggleFileName = prefix + ".wig";\n+\t\t\tSystem.out.println("Wiggle file for all reads created");\n+\t\t\tSystem.out.println("Output written to " + outDir + "data/" + \n+\t\t\t\t\t\t\t\t\t\t\t\t\t\toverallWiggleFileName);\n+\t\t\tif (new File(outDir + "data/" + overallWiggleFileName).exists()) {\n+\t\t\t\tSystem.out.println("\\nSTEP 5 successfully completed.");\n+\t\t\t} else {\n+\t\t\t\tSystem.out.println(outDir + "data/" + overallWiggleFileName\n+\t\t\t\t\t\t+ "not found\\n\\nSTEP 5 unsuccessful");\n+\t\t\t}\n+\t\t} catch (IOException e) {\n+\t\t\tSystem.err\n+\t\t\t\t\t.println("Creating wiggle file for all reads was unsuccessful");\n+\t\t\te.printStackTrace();\n+\t\t}\n+\t}\n+}\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/_main/EnrichmentStatsComputer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/_main/EnrichmentStatsComputer.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b"@@ -0,0 +1,595 @@\n+package _main;\n+\n+import java.io.File;\n+import java.io.FileNotFoundException;\n+import java.io.FileWriter;\n+import java.io.IOException;\n+import java.util.Scanner;\n+\n+import org.jdom.Element;\n+\n+import datastructures.ReducedReadLine;\n+import datastructures.TargetLine;\n+import exceptions.ChromosomeFormatException;\n+import exceptions.ChromosomeNotFoundException;\n+import exceptions.NullOrNegativeRangeException;\n+import exceptions.RangeFormatException;\n+import exceptions.RangeLimitNotFoundException;\n+\n+import middlewares.GeneExtractor;\n+import middlewares.HitsCounter;\n+import middlewares.Misc;\n+import middlewares.ReadCounter;\n+import middlewares.XMLSummaryFileBuilder;\n+\n+/**\n+ * This class is for computation of the coverage, BED coverage and statistics\n+ * output files.\n+ * \n+ * @author Ali Abdallah\n+ * @version 02.02.2011\n+ * @since jdk 1.6.0\n+ */\n+\n+public class EnrichmentStatsComputer {\n+\n+\t/* ***********************************************************************\n+\t * \t\t\t\t\t\t\tFIELDS OF THE CLASS\t\t\t\t\t\t\t\t\n+\t * ***********************************************************************/\n+\tprivate String \n+\t/** \n+\t * 4-column alignment file sorted by alignment subject and position.\n+\t */ \n+\talign, \n+\t/**\n+\t * 3-column target file sorted by subject and target starting position.\n+\t */\n+\ttarget, \n+\t/** \n+\t * Annotation file.\n+\t */\n+\tgenome, \n+\t/**\n+\t * Statistics file in the xml-format.\n+\t */\n+\tsummary, \n+\t/**\n+\t * Coverage file.\n+\t */\n+\tdetails, \n+\t/**\n+\t * Coverage BED file.\n+\t */\n+\ttargetCS,\n+\t/**\n+\t * The absolute name of the read alignment file without the extension.\n+\t */\n+\tprefix, \n+ \n+\t/**\n+\t * The directory under which temporary data are saved (temporary directory).\n+\t */\n+\ttmpDir, \n+\t/**\n+\t * The directory of the computed results (output directory).\n+\t */\n+\toutDir;\n+\t\n+\t\n+\tprivate Scanner \n+\t/**\n+\t * Scanner of the read alignment file (sam format).\n+\t */\n+\trScanner, \n+\t/**\n+\t * Scanner of the genome annotation file.\n+\t */\n+\tgScanner, \n+\t/**\n+\t * Scanner of the file of targets.\n+\t */\n+\ttScanner;\n+\t\n+\tprivate FileWriter \n+\t/**\n+\t * Writer used to write the computed statistics into the statistics file.\n+\t */\n+\tsummaryWriter, \n+\t/**\n+\t * Writer used to write coverage data at base-level into the coverage file. \n+\t */\n+\tdetailsWriter, \n+\t/**\n+\t * Writer used to write the summarized coverage data at target level into\n+\t * the coverage BED file.\n+\t */\n+\ttargetCSWriter;\n+\t\n+\t/**\n+\t * Counter used to counts the coverage frequencies at different levels. \n+\t */\n+\tprivate HitsCounter hc;\n+\t/**\n+\t * Counter used to count both: Reads exactly on the targets or overlapping\n+\t * the targets and Reads doing this in a scope of 100 resp. 200 bases from \n+\t * both end.\n+\t */\n+\tprivate ReadCounter rc;\n+\t\n+\t/**\n+\t * A Gene Extractor used to extract the genes overlapping the specified \n+\t * targets. \n+\t */\n+\tprivate GeneExtractor ge;\n+\t\n+\t/**\n+\t * Counter for the reads.\n+\t */\n+\tprivate int numReads = 0, \n+\t/**\n+\t * Counter for all target bases.\n+\t */\n+\ttargetBases = 0, \n+\t/**\n+\t * Counter for the bases in a specific target.\n+\t */\n+\tcurrTargetBases = 0;\n+\t\n+\t/**\n+\t * The average Coverage of the targets.\n+\t */\n+\tprivate double avCov = 0;\n+\t/**\n+\t * The average Coverage of the current observed target.\n+\t */\n+\tprivate double curAvCov = 0;\n+\t/**\n+\t * Flag indicating the end of the read file.\n+\t */\n+\tprivate boolean endReads = false;\n+\t/**\n+\t * Flag indicates if the coverage line was written or not. \n+\t */\n+\tprivate boolean covWritten = false;\n+\t\n+\t/**\n+\t * Contains always the current observers read line from the sam file.\n+\t */\n+\tprivate ReducedReadLine rLine;\n+\n+\n+\tprivate int rlength;\n+\t\n+\t/**\n+\t * ID's of the leaf-tags in the XML summary file. \n+\t */\n+\tprivate static final int \n+\tfrom30xPERC = 28, from30xBASES = 27,from20xPERC = 26, from20xBASES = 25, \n+\tfrom10xPERC = 24, from10xBASES = 23,from5xPERC = 22, from5xBASES = 21,\n+\tfrom1xPERC = 20, from1xBASES = 19, OV200P = 18, OV_200 = 17,\n+\tOV100P = 16, OV_100 = 15, OV_PERC = 14, OV = 13, "..b'ite(tLine + "\\t" + currTargetGene + "\\t"\n+\t\t\t\t+ dfloor((curAvCov / (double)currTargetBases), 2) + "\\t"\n+\t\t\t\t+ dfloor((hc.getNextLevelCurrentHits() / (double)currTargetBases)*100, 2)\n+\t\t\t\t+ "\\t"\n+\t\t\t\t+ dfloor((hc.getNextLevelCurrentHits() / (double)currTargetBases)*100, 2)\n+\t\t\t\t+ "\\t"\n+\t\t\t\t+ dfloor((hc.getNextLevelCurrentHits() / (double)currTargetBases)*100, 2)\n+\t\t\t\t+ "\\t"\n+\t\t\t\t+ dfloor((hc.getNextLevelCurrentHits() / (double)currTargetBases)*100, 2)\n+\t\t\t\t+ "\\t"\n+\t\t\t\t+ dfloor((hc.getNextLevelCurrentHits() / (double)currTargetBases)*100, 2)\n+\t\t\t\t+ "\\r\\n");\n+\t\tcovWritten = true;\n+\t\thc.resetCurrentHits();\n+\t}\n+\n+\t/**\n+\t * Cut decimal places greater than the specified one.\n+\t * @param number the number to be cut.\n+\t * @param decimalPlace the decimalPlace after which the cut-operation\n+\t * \t\t take place.\n+\t * @return the cut number.\n+\t */\n+\tpublic static double dfloor(double number, int decimalPlace) {\n+\t\treturn Math.floor(number * Math.pow(10, decimalPlace))\n+\t\t\t\t/ Math.pow(10, decimalPlace);\n+\t}\n+\n+\t/**\n+\t * Checks if the read exceeded the target.\n+\t * @param rl read line.\n+\t * @param tl target line.\n+\t * @return true if the read starts right to the end position of the target\n+\t * and false otherwise. \n+\t */\n+\tpublic static boolean readExceededTarget(ReducedReadLine rl, TargetLine tl) {\n+\t\treturn !(rl.start() <= tl.end() || rl.end() <= tl.end());\n+\t}\n+\n+\t/**\n+\t * <pre> \n+\t * 1. Increments the number of Reads, overlapping targets within a scope of \n+\t * \t 0, 100 and 200 bases from both ends, by one.\n+\t * 2. Increments the number of hits on the hitted bases by one. \n+\t * </pre>\n+\t * @param rl the read line.\n+\t * @param tl the target line.\n+\t * @param bases the base hits array of the target.\n+\t */\n+\tprivate void incOverlapsValues(ReducedReadLine rl, TargetLine tl, int[] bases) {\n+\t\t// Forward reads.\n+\t\tif (rl.isForwardRead()) {\n+\t\t\tif (rl.end() >= tl.start() && rl.start() <= tl.end()) {\n+\t\t\t\t// incrementing the number of his on the hitted bases by one.\n+\t\t\t\tint start = Math.max(0, rl.start() - tl.start());\n+\t\t\t\tint stop = Math.min(bases.length - 1, rl.end() - tl.start());\n+\t\t\t\tfor (int i = start; i <= stop; i++) \n+\t\t\t\t\tbases[i]++;\n+\t\t\t\t// incrementing the number of Reads overlapping targets by one.\n+\t\t\t\trc.incOver();\n+\t\t\t}\n+\t\t\tif (tl.start() - 100 <= rl.end() && rl.start() <= tl.end() + 100)\n+\t\t\t\t// incrementing the number of Reads overlapping targets(+/-100)\n+\t\t\t\t// by one.\n+\t\t\t\trc.incOver100();\n+\t\t\tif (tl.start() - 100 <= rl.end() && rl.start() <= tl.end() + 100)\n+\t\t\t\t// incrementing the number of Reads overlapping targets(+/-200)\n+\t\t\t\t// by one.\n+\t\t\t\trc.incOver200();\n+\t\t} \n+\t\t// Reverse reads.\n+\t\telse {\n+\t\t\tif (rl.start() >= tl.start() && rl.end() <= tl.end()) {\n+\t\t\t\tint start = Math.max(0, rl.end() - tl.start());\n+\t\t\t\tint stop = Math.min(bases.length - 1, rl.start() - tl.start());\n+\t\t\t\tfor (int i = start; i <= stop; i++) bases[i]++;\n+\t\t\t\trc.incOver();\n+\t\t\t}\n+\t\t\tif (rl.start() >= tl.start() - 100 && rl.end() <= tl.end() + 100)\n+\t\t\t\trc.incOver100();\n+\t\t\tif (rl.start() >= tl.start() - 100 && rl.end() <= tl.end() + 100)\n+\t\t\t\trc.incOver200();\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * Increments the number of Reads on targets within a scope of 0, 100 and \n+\t * 200 bases from both ends, by one.\n+\t * @param rl the read line.\n+\t * @param tl the target line.\n+\t */\n+\tprivate void incOnTargetValues(ReducedReadLine rl, TargetLine tl) {\n+\t\t// Forward read.\n+\t\tif (rl.isForwardRead()) {\n+\t\t\tif ((tl.start() <= rl.start()) && (rl.end() <= tl.end()))\n+\t\t\t\trc.incOn();\n+\t\t\tif ((tl.start()-100 <= rl.start()) && (rl.end() <= tl.end()+100))\n+\t\t\t\trc.incOn100();\n+\t\t\tif ((tl.start()-200 <= rl.start()) && (rl.end() <= tl.end()+200))\n+\t\t\t\trc.incOn200();\n+\t\t} \n+\t\t// Reverse read.\n+\t\telse {\n+\t\t\tif (tl.start() <= rl.end() && rl.start() <= tl.end())\n+\t\t\t\trc.incOn();\n+\t\t\tif (tl.start()-100 <= rl.end() && rl.start()<= tl.end()+100)\n+\t\t\t\trc.incOn100();\n+\t\t\tif (tl.start()-200 <= rl.end() && rl.start() <= tl.end()+200)\n+\t\t\t\trc.incOn200();\n+\t\t}\n+\t}\n+\n+}\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/_main/NGSrichEvaluate.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/_main/NGSrichEvaluate.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,227 @@\n+package _main;\n+\n+import java.io.BufferedInputStream;\n+import java.io.File;\n+import java.io.FileInputStream;\n+import java.io.FileWriter;\n+import java.io.IOException;\n+import java.sql.Time;\n+import java.util.Properties;\n+import middlewares.Misc;\n+import exceptions.ChromosomeMismatchException;\n+import exceptions.FileFormatException;\n+\n+/**\n+ * This is the Main-class of the evaluation part of the software. This class\n+ * uses the Enrichment-class to process the phases (the parts) of the pipeline.\n+ * \n+ * @author Ali Abdallah\n+ */\n+\n+public class NGSrichEvaluate {\n+\n+\t/**\n+\t * An array of arguments containing the following option elements in the \n+\t * following order:\n+\t * -r <readsFile> (-a|-g) <annotation> -t <target> [-s <sName>] \n+\t * [-T <tmpDir>][-o <outDir>][-p <poor> -h <high>][-no_details]\n+\t * \n+\t * Required:\n+\t * <readsFile> \tPath to read alignment file in SAM or BAM format.\n+\t * <annotation> UCSC genome version name.\n+\t * <target>\t\tPath to target file in BED format.\n+\t * \n+\t * Optional:\n+\t * <sName> \t\tSample name [default: prefix of <readsFile>].\n+\t * <tmpDir> \tTemporary directory [default: \'/tmp\'].\n+\t * <outDir> \tOutput directory [default: \'<pathToReadsFile>/enrichment\'].\n+\t * <poor> \t\tCutoff for poor coverage [default: 2].\n+\t * <high> \t\tCutoff for high coverage [default: 200].\n+\t */\n+\tString[] args;\n+\n+\tpublic NGSrichEvaluate(String[] args) {\n+\t\tthis.args = args;\n+\t}\n+\n+\tpublic void evaluate() throws IOException, FileFormatException,\n+\t\t\tInterruptedException {\n+\t\t/**\n+\t\t * Ordered List of Parameter (left/right): readFName genomeFName\n+\t\t * targetFName tmpDir outDir\n+\t\t * \n+\t\t */\n+\n+\t\tint alen = args.length;\n+\t\tString[] params = new String[10];\n+\n+\t\tString usagestr = \n+\t\t\t\t"\\nUsage: java NGSrich evaluate -r <readsFile> " \n+\t\t\t\t+ "-u <genome-name> -t <target> [(-a|-g) "\n+\t\t\t\t+ "<annotation>] [-s <sName>] [-T <tmpDir>] "\n+\t\t\t\t+ "[-o <outDir>] [-p <poor> -h <high>][--no-details>]\\n\\n\\tRequired:\\n\\t"\n+\t\t\t\t+ "<readsFile>\\tPath to read alignment file in SAM or BAM format."\n+\t\t\t\t+ "\\n\\t<genome-name>\\tUCSC genome version name.\\n\\t<target>\\tPath "\n+\t\t\t\t+ "to target file in BED format.\\n\\n\\tOptional:\\n\\t<sName>\\t\\t"\n+\t\t\t\t+ "Sample name [default: prefix of <readsFile>].\\n\\t<annotation>\\t\\t"\n+\t\t\t\t+ "path of the annotation file [default: the genome is " \n+\t\t\t\t+ "downloaded based on the genome version name].\\n\\t<tmpDir>\\t"\n+\t\t\t\t+ "Temporary directory [default: \'/tmp\'].\\n\\t<outDir>\\tOutput "\n+\t\t\t\t+ "directory [default: \'<pathToReadsFile>/enrichment\'].\\n\\t"\n+\t\t\t\t+ "<poor>\\t\\tCutoff for poor coverage [default: 2].\\n\\t<high>"\n+\t\t\t\t+ "\\t\\tCutoff for high coverage [default: 200]. \\n\\t--no-details\\tto repress the computation of the" +\n+\t\t\t\t\t\t" evaluation details\\n";\n+\t\t\n+\t\tif (alen == 0) {\n+\t\t\tSystem.out.println(usagestr);\n+\t\t\tSystem.exit(0);\n+\t\t}\n+\n+\t\tboolean t = false, o = false, h = false, po = false, sname = false, u = false, r = false, g = false,\n+\t\t\t\ta = false, T = false;\n+\t\tparams[9] = "1";\n+\t\tfor (int i = 0; i < alen; i = i + 2) {\n+\t\t\tif ((args[i].length() == 2 && args[i].charAt(0) == \'-\') || args[i].equals("--no-details")) {\n+\t\t\t\tchar flag = (args[i].length()==2)?args[i].charAt(1):args[i].charAt(2);\n+\t\t\t\tswitch (flag) {\n+\t\t\t\tcase \'r\': params[0] = args[i + 1];r = true;break;\n+\t\t\t\tcase \'g\': params[1] = args[i + 1];g = true;break;\n+\t\t\t\tcase \'a\': params[1] = args[i + 1];a = true;break;\n+\t\t\t\tcase \'t\': params[2] = args[i + 1];t = true;break;\n+\t\t\t\tcase \'T\': params[3] = args[i + 1];T = true;break;\n+\t\t\t\tcase \'o\': params[4] = args[i + 1];o = true;break;\n+\t\t\t\tcase \'p\': params[5] = args[i + 1];po = true;break;\n+\t\t\t\tcase \'h\': params[6] = args[i + 1];h = true;break;\n+\t\t\t\t// Added by PF 2011-07-12\n+\t\t\t\tcase \'s\': params[7] = args[i + 1];sname = true;break;\n+\t\t\t\tcase \'u\': params[8] = args[i+1]; u = true;break;\n+\t\t\t\tcase \'n\': params[9]="0";break;\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tSystem.out.println(usagestr);\n+\t\t\t\tSystem.exit(0);\n+\t\t\t}\n+\t\t}\n+\t\t\n+\t\tboolean required = r && t && u;\n+\t\t\n+\t\tif(!required){\n+\t\t\tSystem.out.println("Some requir'..b'params[0]);\n+\t\t\tparams[4] = oPath + Misc.slash(oPath) + p.getProperty("outDir");\n+\t\t\tnew File(params[4]).mkdir();\n+\t\t}\n+\t\tif (!po)params[5] = p.getProperty("poor");\n+\t\tif (!h)params[6] = p.getProperty("high");\n+\t\tif (!sname)params[7] = "none";\n+\t\tif (!(a||g))params[1] = "none";\n+\t\t\n+\t\tEnrichment ngs = new Enrichment(params);\n+\t\t// Convert BAM to SAM if necessary.\n+\t\tString infile = params[0];\n+\t\tif (infile.endsWith(".bam")) {\n+\t\t\tSystem.out.println("======================0======================");\n+\t\t\tSystem.out.println("\\n>>> Found BAM file: converting to SAM\\n");\n+\t\t\tinfile = ngs.bam2sam();\n+\t\t}\n+\t\tngs.readFileName = infile;\n+\n+\t\t//\t\tFile timeReport = \n+\t\t//\tnew File(params[3] + Misc.slash(params[3])+"TimeReport.txt");\n+\t\t//\t\tFileWriter trWriter = new FileWriter(timeReport);\n+\t\t\n+\t\t// Reduce the files.\n+\t\tSystem.out.println("======================1======================");\n+\t\tSystem.out.println(">>> STEP 1: reducing files\\n");\n+\t\ttry {\n+\t\t\tlong start = System.currentTimeMillis();\n+\t\t\tngs.reduceFiles();\n+\t\t\tlong rtime = System.currentTimeMillis() - start;\n+\t\t\tTime time = new Time(rtime);\n+\t\t\t//trWriter.write("Reducing files took: " + time + "\\n");\n+\n+\t\t} catch (ChromosomeMismatchException e) {\n+\t\t\te.printStackTrace();\n+\t\t}\n+\t\t\n+\t\t// Compute the target coverage files.\n+\t\tSystem.out.println("\\n======================2======================");\n+\t\tSystem.out.println(">>> STEP 2: computing target coverage data\\n");\n+\t\tlong start = System.currentTimeMillis();\n+\t\tngs.computeTargetCoverageFiles();\n+\t\tlong rtime = System.currentTimeMillis() - start;\n+\t\tTime time = new Time(rtime);\n+\t\t//\t\ttrWriter.write("Computing target coverage data took: " + time + "\\n");\n+\t\t\n+\t\t// Evaluate enrichment.\n+\t\tSystem.out.println("\\n======================3======================");\n+\t\tSystem.out.println(">>> STEP 3: evaluating enrichment files\\n");\n+\t\tstart = System.currentTimeMillis();\n+\t\tngs.evaluate();\n+\t\trtime = System.currentTimeMillis() - start;\n+\t\ttime = new Time(rtime);\n+\t\t//trWriter.write("Evaluating enrichment files took: " + time + "\\n");\n+\t\tThread.sleep(10000);\n+\t\t\n+\t\t// Compute the target wiggle files.\n+\t\tSystem.out.println("\\n======================4======================");\n+\t\tSystem.out.println(">>> STEP 4: computing targets wiggle data\\n");\n+\t\tstart = System.currentTimeMillis();\n+\t\tngs.computeWiggleFile();\n+\t\trtime = System.currentTimeMillis() - start;\n+\t\ttime = new Time(rtime);\n+\t\t//trWriter.write("Computing targets wiggle data took: " + time + "\\n");\n+\n+\t\t// Compute the overall wiggle files.\n+\t\tSystem.out.println("\\n======================5======================");\n+\t\tSystem.out.println(">>> STEP 5: computing overall wiggle data\\n");\n+\t\tngs.computeOverallWiggleFile();\n+\t\tstart = System.currentTimeMillis();\n+\t\tngs.computeOverallWiggleFile();\n+\t\trtime = System.currentTimeMillis() - start;\n+\t\ttime = new Time(rtime);\n+\t\t//trWriter.write("Computing targets wiggle data took: " + time + "\\n");\n+\t\tSystem.out.println("\\n=============================================");\n+\t\t//trWriter.close();\n+\t}\n+\n+\tprivate String createDefaultPropertiesFile() throws IOException {\n+\t\tString default_properties_file = \n+\t\t\tMisc.binDir()+Misc.slash(Misc.binDir())+"DEFAULT.properties";\n+\t\tif(!new File(default_properties_file).exists()){\n+\t\t\tString default_str = \n+\t\t\t\t"! Path of the temporary directory.\\n" +\n+\t\t\t\t"tmpDir: /tmp\\n" +\n+\t\t\t\t"! Path of the father directory of the output directory. " +\n+\t\t\t\t"When empty the output directory is placed in the directory " +\n+\t\t\t\t"containing the reads alignment file.\\n" +\n+\t\t\t\t"outDirPath:\\n" +\n+\t\t\t\t"! Name of the output directory (not the path).\\n" +\n+\t\t\t\t"outDir: enrichment\\n" +\n+\t\t\t\t"! Define poorly covered genes.\\n" +\n+\t\t\t\t"poor: 2\\n" +\n+\t\t\t\t"! Defines highly covered genes.\\n" +\n+\t\t\t\t"high: 200";\n+\t\t\tFileWriter properties_writer = \n+\t\t\t\t\t\t\t\t\tnew FileWriter(default_properties_file);\n+\t\t\tproperties_writer.write(default_str);\n+\t\t\tproperties_writer.close();\n+\t\t}\n+\t\treturn default_properties_file;\n+\t}\n+}\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/_main/NGSrichSummarize.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/_main/NGSrichSummarize.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,106 @@ +package _main; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.Properties; +import java.util.Scanner; + +import middlewares.Misc; +import exceptions.FileFormatException; + +/** + * This is the Main-class of the summarization part of the software. This class + * is a wrapper class. It calls the r-script "summarize_enrichment.R" which + * summarizes the evaluations of multiple samples. + * + * @author Peter Frommolt + */ + +public class NGSrichSummarize { + + /** + * An array of arguments containing the following option elements in the + * very same order: -i <inputIndex> -o <outDir> [-p <poor> -h <high>] + * + * Required: + * <inputIndex> File with evaluation directories to be summarized, one per + * line. + * <outDir> Output directory. + * + * Optional: + * <poor> Cutoff for poorly covered genes [default: 2]. + * <high> Cutoff for highly covered genes [default: 200]. + * + */ + String[] args; + + public NGSrichSummarize(String[] args){ + this.args = args; + } + + public void summarize() throws FileFormatException, + IOException, + InterruptedException{ + int alen = args.length; + String[] params = new String[4]; + + String usagestr="\nUsage: NGSrich summarize -i <inputIndex> -o <outDir> " + + "[-p <poor> -h <high>]\n\n\tRequired:\n\t<inputIndex>\tFile " + + "with evaluation directories to be summarized, one per line." + + "\n\t<outDir>\tOutput directory.\n\n\tOptional:\n\t<poor>\t\t" + + "Cutoff for poorly covered genes [default: 2].\n\t<high>\t\t" + + "Cutoff for highly covered genes [default: 200].\n"; + + if(alen==0){ + System.out.println(usagestr); + System.exit(0); + } + + boolean i=false, o=false, h=false, po=false; + for(int k = 0; k < alen; k=k+2){ + if(args[k].length() == 2 && args[k].charAt(0)=='-'){ + char flag = args[k].charAt(1); + switch(flag){ + case 'i': params[0]=args[k+1]; i=true; break; + case 'o': params[1]=args[k+1]; o=true; break; + case 'p': params[2]=args[k+1]; po=true; break; + case 'h': params[3]=args[k+1]; h=true; break; + } + } + else{ + System.out.println(usagestr); + System.exit(0); + } + } + + Properties p = new Properties(); + FileInputStream stream=new FileInputStream(Misc.binDir()+Misc.slash(Misc.binDir())+"DEFAULT.properties"); + p.load(stream); stream.close(); + + String infile, outdir, poor, high; + + if(!i){System.out.println("Error: Argument -i is mandatory"); System.exit(1);} + if(!o){System.out.println("Error: Argument -o is mandatory"); System.exit(1);} + infile=params[0]; outdir=params[1]; + + if(!po){poor=p.getProperty("poor");} + else{poor=params[2];} + + if(!h){high=p.getProperty("high");} + else{high=params[3];} + + Runtime rt=Runtime.getRuntime(); + String rScriptAbsolutePathName=Misc.binDir()+Misc.slash(Misc.binDir())+"../R/summarize_enrichment.R"; + Process proc = rt.exec(rScriptAbsolutePathName+" "+infile+" "+outdir+" "+poor+" "+high); + + /*Scanner sc=new Scanner(proc.getInputStream()); String erg = ""; + while(sc.hasNextLine()){erg += (sc.nextLine());} + sc.close();*/ + + Scanner stdout = new Scanner(proc.getInputStream()); + Scanner stderr=new Scanner(proc.getErrorStream()); + while (stdout.hasNextLine()){System.out.println(stdout.nextLine());} + while(stderr.hasNextLine()){System.out.println(stderr.nextLine());} + stdout.close(); stderr.close(); + + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/converters/Read2Wig.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/converters/Read2Wig.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,267 @@\n+package converters;\n+\n+import java.io.File;\n+import java.io.FileNotFoundException;\n+import java.io.FileWriter;\n+import java.io.IOException;\n+import java.util.Scanner;\n+\n+import datastructures.GenomeFrame;\n+import datastructures.ReadFrame;\n+import datastructures.ReducedReadLine;\n+import exceptions.ChromosomeFormatException;\n+import exceptions.ChromosomeNotFoundException;\n+import exceptions.RangeFormatException;\n+import exceptions.RangeLimitNotFoundException;\n+\n+import middlewares.Misc;\n+\n+/**\n+ * <P>This is a converter class, wich convert a reduced alignment file with the \n+ * following format:</P>\n+ * <TABLE>\n+ * \t<TR>\n+ * \t\t<TD width= "140"><B>read-name</B></TD>\t\t\n+ * \t\t<TD width= "200"><B>chromosom-name</B></TD>\t\t\n+ * \t\t<TD width= "150"><B>start-position</B></TD>\t\t\n+ *\t\t<TD width= "200"><B>end-position</B></TD>\n+ * </TR>\n+ * <TR height=""></TR>\n+ * </TABLE>\n+ * <P>to the wiggle-format. The wiggle format (WIG) allows the display of continuous-\n+ * valued data in a track format and it is used to visualize the read enrichment\n+ * with the <a href="http://genome.ucsc.edu/cgi-bin/hgGateway" target="_new">ucsc genome browser</a>. Click on the following link: \n+ * <a href="http://genome.ucsc.edu/goldenPath/help/wiggle.html" target="_new">\n+ * http://genome.ucsc.edu/goldenPath/help/wiggle.html</a> for more information.</P>\n+ * \n+ * @author Ali Abdallah\n+ * @version 06.01.2011\n+ * @since jdk 1.6.0\n+ */\n+\n+public class Read2Wig {\n+\t\n+\tprivate static final int LENGTH = 1024;\n+\tprivate File alignFile;\n+\tprivate File outputFile;\n+\tprivate String outputDir;\n+\tprivate int gMin = Integer.MAX_VALUE;\n+\tprivate int gMax = Integer.MIN_VALUE;\n+\tprivate FileWriter tmpWigWriter;\n+\t\n+\t/**\n+\t * Constructs and initialzes a new Read2Wig object. \n+\t * Converts the read alignment file to a overall covrage wig file.\n+\t * \n+\t * @param alignFileName the name of the alignment file.\n+\t * @throws IOException\n+\t */\n+ public Read2Wig(String alignFileName,String outPrefix,String outputDir,String genome,String tmpDir) throws IOException{\n+\t\t// Das File-Objekt zur Behandlung der Alignment-Datei erzeugen.\n+\t\tthis.alignFile = new File(alignFileName);\n+\t\tthis.outputDir = outputDir+Misc.slash(outputDir);\n+\t\ttmpWigWriter = new FileWriter(tmpDir+Misc.slash(tmpDir)+"tmpWig.wig");\n+\t\tconvert(alignFileName,this.outputDir,outPrefix);\n+\t\ttry{\n+\t\t wigToBigWig("hg19",tmpDir);\n+\t\t}\n+\t\tcatch(Exception e){\n+\t\t\tSystem.err.println("Converting wig file to a bigwig file failed. " +\n+\t\t\t\t\t"Check whether you have a 64-bit linux system!");\n+\t\t}\n+\t}\n+ \n+ private void convert(String alignFileName, String outputDir,String outPrefix) throws FileNotFoundException, IOException {\n+\t\tScanner s = new Scanner(this.alignFile);\n+\t\tcomputeExtremas(s); s.close();\n+\t\tScanner readScanner = new Scanner(this.alignFile);\n+\t\talignFileName = Misc.prefix(alignFileName);\n+\t\tScanner as = new Scanner(alignFileName);\n+\t\tas.useDelimiter("_");\n+\t\tas.next();\n+\t\toutputFile = new File(outputDir+outPrefix+".wig");\n+\t\tFileWriter fw = new FileWriter(outputFile);\n+\t\t\n+\t\tannotationHeader(fw);\n+\n+\t\tReadFrame readF = computeNextRead(readScanner); //Current read frame\n+\t\tGenomeFrame frame = new GenomeFrame(readF.start(), LENGTH); //Current base frame\n+\t\tString chrom = readF.chrom(); //Current chromosome\n+\t\tif(frame.contains(readF)){frame.updateHits(readF);} //Sum up all hits of curr read\n+\t\twriteHeader(fw, frame, readF); //Write header line\n+\t\t\n+\t\twhile(true){\n+\t\t while(readScanner.hasNextLine() && chrom.equals(readF.chrom()) && frame.contains(readF)){\n+\t\t\tframe.updateHits(readF); readF = computeNextRead(readScanner);\n+\t\t }\n+\t\t while(readScanner.hasNextLine() && chrom.equals(readF.chrom()) && frame.overlaps(readF) && !frame.limitExceeded(readF)){\n+\t\t\tframe.updateFrameFromRightEnd(readF); frame.updateHits(readF); readF = computeNextRead(readScanner);\n+\t\t }\n+\t\t if(!readScanner.hasNextLine()){break;}\n+\t\t else if(!chrom.equals(readF.chrom())){\n+\t\t\tframe = new GenomeFrame(readF.st'..b'+".chrom.sizes");\n+\t\t\tScanner s = new Scanner(p.getInputStream());\n+\t\t\twhile(s.hasNextLine())\n+\t\t\t\tfw.write(s.nextLine()+"\\r\\n");\n+\t\t\tfw.close();\n+\t\t\t\n+\t\t\tRuntime.getRuntime().exec(wig2bw+" "+outputFile.getAbsolutePath()\n+\t\t\t\t\t+" "+outputDir+Misc.slash(outputDir)+genome+".chrom.sizes "+\n+\t\t\t\t\toutputDir+Misc.slash(outputDir)+\n+\t\t\t\t\tMisc.prefix(outputFile.getAbsolutePath())+".bw");\n+\t\t\tnew File(outputDir+Misc.slash(outputDir)+genome+".chrom.sizes").delete();\n+\t\t\tnew File(tmpDir+Misc.slash(tmpDir)+"tmpWig.wig").delete();\n+\t\t} catch (IOException e) {\n+\t\t\t// TODO Auto-generated catch block\n+\t\t\te.printStackTrace();\n+\t\t}\n+\t}\n+\n+\tprivate void computeExtremas(Scanner s){\n+\t\tString chrom = "Datei falsch formatiert.";\n+\t\tString oldChrom = null;\n+\t\tint start = -1;\n+\t\tint end = -1;\n+\t\tString line = s.nextLine();\n+\t\t\n+\t\toldChrom = chrom(line); start = start(line); end = end(line);\n+\t\t\n+\t\twhile(s.hasNextLine()){\n+\t\t\tline = s.nextLine();\n+\t\t\tif(isHeader(line)){\n+\t\t\t\tchrom = chrom(line); start = start(line); end = end(line);\n+\t\t\t\tif(gMin > start && chrom.equals(oldChrom))\n+\t\t\t\t\tgMin = start;\n+\n+\t\t\t\tif(gMax < end && chrom.equals(oldChrom))\n+\t\t\t\t\tgMax = end;\n+\t\t\t}\n+\t\t}\n+\t}\n+\t\n+\tprivate boolean isHeader(String line){\n+\t\treturn line.indexOf("chr")!=-1;\n+\t}\n+\t\n+\tprivate int start(String line){\n+\t\tScanner s = new Scanner(line);\n+\t\ts.next();s.next();\n+\t\treturn s.nextInt();\n+\t}\n+\t\n+\tprivate int end(String line){\n+\t\tScanner s = new Scanner(line);\n+\t\ts.next();s.next();s.next();\n+\t\treturn s.nextInt();\n+\t}\n+\t\n+\tprivate String chrom(String line){\n+\t\tScanner s = new Scanner(line);\n+\t\ts.next();\n+\t\treturn s.next();\n+\t}\n+\n+\tprivate void writeFramePortion(FileWriter fw, GenomeFrame frame, int start2) throws IOException {\t\t\n+\t\tfor(int base = frame.start(); base < start2; base++){\n+\t\t\tfw.write(frame.getHit(base)+"\\r\\n");\n+\t\t\ttmpWigWriter.write(frame.getHit(base)+"\\r\\n");\n+\t\t}\n+\t}\n+\n+\tprivate void writeFrameLeak(FileWriter fw, \n+\t\t\t\t\t\t\t\tGenomeFrame last, GenomeFrame frame, ReadFrame read) \n+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrows IOException {\n+\t\tif(frame.start()-last.end() > 50){\n+\t\t\twriteHeader(fw, frame, read);\n+\t\t}\n+\t\telse{\n+\t\t\tfor(int i = 0; i < frame.start()-last.end()-1; i++){\n+\t\t\t\tfw.write(0+"\\r\\n");\n+\t\t\t\ttmpWigWriter.write(0+"\\r\\n");\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tprivate void annotationHeader(FileWriter fw) throws IOException{\n+\t\tString browserLines = \t"browser position chr1:"+gMin+"-"+gMax+"\\r\\n"+\n+\t\t\t\t\t\t\t\t"browser hide all"+"\\r\\n"+\n+\t\t\t\t\t\t\t\t"browser pack refGene encodeRegions"+"\\r\\n"+\n+\t\t\t\t\t\t\t\t"browser full altGraph";\n+\t\tScanner as = new Scanner(alignFile.getName());\n+\t\tas.useDelimiter("_");as.next();\n+\t\tString trackLine = \t"track type=wiggle_0 name=\\""+as.next()+"\\" " +\n+\t\t\t\t\t\t\t"description=\\"Base read coverage\\" visibility=full " +\n+\t\t\t\t\t\t\t"color=0,0,0 altColor=255,0,0 priority=20 " +\n+\t\t\t\t\t\t\t"autoScale=on";\n+\t\tfw.write(browserLines+"\\r\\n"+trackLine+"\\r\\n");\n+\t}\n+\n+\tprivate void writeHeader(FileWriter fw, GenomeFrame frame, ReadFrame read)\n+\t\t\tthrows IOException {\n+\t\tfw.write("fixedStep chrom="+read.chrom()\n+\t\t\t\t\t\t\t\t\t+" start="+frame.start()\n+\t\t\t\t\t\t\t\t\t\t+ " step=1\\r\\n");\n+\t\ttmpWigWriter.write("fixedStep chrom="+read.chrom()\n+\t\t\t\t+" start="+frame.start()\n+\t\t\t\t\t+ " step=1\\r\\n");\n+\t}\n+\t\n+\tprivate void writeFrame(FileWriter fw, GenomeFrame frame) throws IOException {\n+\t\t// TODO Auto-generated method stub\n+\t\tfor(int base = frame.start(); base <= frame.end(); base++){\n+\t\t\tfw.write(frame.getHit(base)+"\\r\\n");\n+\t\t\ttmpWigWriter.write(frame.getHit(base)+"\\r\\n");\n+\t\t}\n+\t}\n+\n+\tprivate ReadFrame computeNextRead(Scanner afScanner) {\t\n+\t\tReducedReadLine rl = null;\n+\t\ttry {\n+\t\t\trl = new ReducedReadLine(afScanner.nextLine());\n+\t\t} catch (ChromosomeFormatException e) {\n+\t\t\te.printStackTrace();\n+\t\t} catch (ChromosomeNotFoundException e) {\n+\t\t\te.printStackTrace();\n+\t\t} catch (RangeFormatException e) {\n+\t\t\te.printStackTrace();\n+\t\t} catch (RangeLimitNotFoundException e) {\n+\t\t\te.printStackTrace();\n+\t\t}\t\t\t\t\n+\t\treturn new ReadFrame(rl.name(), rl.chrom(), rl.start(), rl.end());\n+\t}\n+\n+}\n+\n+\n+\n+\n+\n+\n+\n+\n+\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/converters/ReadOnTarget2Wig.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/converters/ReadOnTarget2Wig.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,187 @@ +package converters; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Scanner; +import middlewares.Misc; + +/** + * Converts the detailed coverage data to the wig format. Used for the + * visualization of the coverage data in the ucsc-browser. + * + * @author Ali Abdallah + * @version 20.07.2011 + * @since Java 1.6 + */ +public class ReadOnTarget2Wig { + + private int + /** + * The maximal number of hits on a base. + */ + max, + /** + * The minimal number of hits on a base. + */ + min, + /** + * The minimal position on chr1. + */ + gMin, + /** + * the maximal position on chr1. + */ + gMax; + + private String + /** + * The name of the file of detailed coverage data. + */ + filename, + /** + * The title of the track. + */ + title; + + /** + * Constructs an new ReadOnTarget2Wig object, initializes the parameters + * and call the conversion method. + * + * @param filename + * @param prefix + * @param outDir + * @param title + * @throws IOException + */ + public ReadOnTarget2Wig(String filename, String prefix, String outDir, String title) throws IOException{ + this.filename = filename; + max = Integer.MIN_VALUE; gMax = Integer.MIN_VALUE; + min = Integer.MAX_VALUE; gMin = Integer.MAX_VALUE; + this.title = title; + File f=new File(this.filename); + FileWriter fw=new FileWriter(outDir+Misc.slash(outDir) + +prefix+"_onTarget.wig"); + Scanner scanForMinMax=new Scanner(f); + computeExtremas(scanForMinMax); + scanForMinMax.close(); + + Scanner s = new Scanner(f); + annotationHeader(fw); + toWiggleFormat(fw,s); + fw.close(); + } + + /** + * Writes the annotation header to the wig file. + * + * @param fw FileWriter + * @throws IOException if write operation is not possible. + */ + private void annotationHeader(FileWriter fw) throws IOException{ + String browserLines = "browser position chr1:"+gMin+"-"+gMax+"\r\n"+ + "browser hide all"+"\r\n"+ + "browser pack refGene encodeRegions"+"\r\n"+ + "browser full altGraph"; + String trackLine = "track type=wiggle_0 name=\""+title+"\" " + + "description=\"Base read coverage\" visibility=full " + +"color=0,0,0 altColor=255,0,0 priority=20 " + + "autoScale=off graphType=bar " + + "viewLimits="+min+":"+max; + fw.write(browserLines+"\r\n"+trackLine+"\r\n"); + } + + /** + * Computes the hit and position minimas and maxima. + * + * @param s the reader of the file of detailed coverage data. + */ + private void computeExtremas(Scanner s){ + String chrom = "Datei falsch formatiert."; + int start = -1; int end = -1; + while(s.hasNextLine()){ + String line = s.nextLine(); + if(isHeader(line)){ + chrom = chrom(line); start = start(line); end = end(line); + if(gMin > start && chrom.equals("chr1")){gMin = start;} + if(gMax < end && chrom.equals("chr1")){gMax = end;} + } + else{ + if(min > Integer.parseInt(line.trim())){ + min = Integer.parseInt(line.trim()); + } + if(max < Integer.parseInt(line.trim())){ + max = Integer.parseInt(line.trim()); + } + } + } + } + + /** + * The main computation: conversion to wiggle format. + * + * @param fw FileWriter into the wig-file. + * @param s the reader of the file of detailed coverage data. + * @throws IOException if i/o fails. + */ + private void toWiggleFormat(FileWriter fw, Scanner s) throws IOException { + String chrom = "Datei falsch formatiert."; + int start = -1; + while(s.hasNextLine()){ + String line = s.nextLine(); + if(isHeader(line)){ + chrom = chrom(line); start = start(line); + fw.write(declarationLine(chrom, start)); + } + else fw.write(line+"\r\n"); + } + } + + /** + * @param chrom + * @param start + * @return a String representing the declaration line corresponding to the + * specified parameters. + */ + private String declarationLine(String chrom, int start) { + return "fixedStep chrom="+chrom+" start="+start+" step=1\r\n"; + } + + /** + * Check if the specified line is a header line. + * + * @param line the current observerd line in the file of detailed coverage + * data. + * @return true if line is a header and false otherwise. + */ + private boolean isHeader(String line){ + return line.indexOf("chr")!=-1; + } + + /** + * @param line + * @return the start position of the current frame (header). + */ + private int start(String line){ + Scanner s = new Scanner(line); + s.next(); return s.nextInt(); + } + + /** + * @param line + * @return the end position of the current frame. + */ + private int end(String line){ + Scanner s = new Scanner(line); + s.next(); s.next(); + return s.nextInt(); + } + + /** + * @param line + * @return the chromosome corresponding to the current frame. + */ + private String chrom(String line){ + Scanner s = new Scanner(line); + return s.next(); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/dataGenerators/AnnotationDataGenerator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/dataGenerators/AnnotationDataGenerator.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,5 @@ +package dataGenerators; + +public class AnnotationDataGenerator { + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/dataGenerators/ReadAlginmentDataGenerator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/dataGenerators/ReadAlginmentDataGenerator.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,30 @@ +package dataGenerators; + +import java.util.Random; + +public class ReadAlginmentDataGenerator { + + String[] chrs = {"chr1","chr2","chr3","chr4","chr5","chr6","chr7","chr8","chr9","chr10","chr11","chr12", + "chr13","chr14", "chr15","chr16","chr17","chr18","chr19","chr20","chr21","chrX","chrY"}; + + String qname = "dummy"; + String flag = "0"; + String chr; + int start; + String mapq = "0"; + String cigar = "dummy"; + String mrnm = "*"; + String mpos = "0"; + String isize = "0"; + String seq = "CAACCCTAACCCTAACCCAAACCCCAACCCTAACCCTACCCCTACCCCAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACC"; + String qua = "#################################################FCCGGGFGGD=GDDIHIGHIJIGHGDJJIHGIHHHGFIHHBHFFFFFFBCB"; + String tvv = "dummy"; + + public String generateReadLine(int pos, int length){ + Random r = new Random(); + return null; + + + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/dataGenerators/TargetDataGenerator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/dataGenerators/TargetDataGenerator.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,5 @@ +package dataGenerators; + +public class TargetDataGenerator { + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/dataGenerators/TestDataGenerator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/dataGenerators/TestDataGenerator.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,7 @@ +package dataGenerators; + +public class TestDataGenerator { + + + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/AVLNode.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/AVLNode.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,32 @@ +package datastructures; + + +// Basic node stored in AVL trees +// Note that this class is not accessible outside +// of package DataStructures + +class AVLNode +{ + // Constructors + @SuppressWarnings("unchecked") + AVLNode( Comparable theElement ) + { + this( theElement, null, null ); + } + + @SuppressWarnings("unchecked") + AVLNode( Comparable theElement, AVLNode lt, AVLNode rt ) + { + element = theElement; + left = lt; + right = rt; + height = 0; + } + + // Friendly data; accessible by other package routines + @SuppressWarnings("unchecked") + Comparable element; // The data in the node + AVLNode left; // Left child + AVLNode right; // Right child + int height; // Height +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/AVLTree.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/AVLTree.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,294 @@\n+package datastructures;\n+\n+// BinarySearchTree class\n+//\n+// CONSTRUCTION: with no initializer\n+//\n+// ******************PUBLIC OPERATIONS*********************\n+// void insert( x ) --> Insert x\n+// void remove( x ) --> Remove x (unimplemented)\n+// Comparable find( x ) --> Return item that matches x\n+// Comparable findMin( ) --> Return smallest item\n+// Comparable findMax( ) --> Return largest item\n+// boolean isEmpty( ) --> Return true if empty; else false\n+// void makeEmpty( ) --> Remove all items\n+// void printTree( ) --> Print tree in sorted order \n+\n+/**\n+ * Implements an AVL tree.\n+ * Note that all "matching" is based on the compareTo method.\n+ * @author Mark Allen Weiss\n+ */\n+public class AVLTree\n+{\n+ /**\n+ * Construct the tree.\n+ */\n+ public AVLTree( )\n+ {\n+ root = null;\n+ }\n+\n+ /**\n+ * Insert into the tree; duplicates are ignored.\n+ * @param x the item to insert.\n+ */\n+ @SuppressWarnings("unchecked")\n+\tpublic void insert(Comparable x )\n+ {\n+ root = insert( x, root );\n+ }\n+\n+ /**\n+ * Remove from the tree. Nothing is done if x is not found.\n+ * @param x the item to remove.\n+ */\n+ @SuppressWarnings("unchecked")\n+\tpublic void remove( Comparable x )\n+ {\n+ System.out.println( "Sorry, remove unimplemented" );\n+ }\n+\n+ /**\n+ * Find the smallest item in the tree.\n+ * @return smallest item or null if empty.\n+ */\n+ @SuppressWarnings("unchecked")\n+\tpublic Comparable findMin( )\n+ {\n+ return elementAt( findMin( root ) );\n+ }\n+\n+ /**\n+ * Find the largest item in the tree.\n+ * @return the largest item of null if empty.\n+ */\n+ @SuppressWarnings("unchecked")\n+\tpublic Comparable findMax( )\n+ {\n+ return elementAt( findMax( root ) );\n+ }\n+\n+ /**\n+ * Find an item in the tree.\n+ * @param x the item to search for.\n+ * @return the matching item or null if not found.\n+ */\n+ @SuppressWarnings("unchecked")\n+\tpublic Comparable find( Comparable x )\n+ {\n+ return elementAt( find( x, root ) );\n+ }\n+\n+ /**\n+ * Make the tree logically empty.\n+ */\n+ public void makeEmpty( )\n+ {\n+ root = null;\n+ }\n+\n+ /**\n+ * Test if the tree is logically empty.\n+ * @return true if empty, false otherwise.\n+ */\n+ public boolean isEmpty( )\n+ {\n+ return root == null;\n+ }\n+\n+ /**\n+ * Print the tree contents in sorted order.\n+ */\n+ public void printTree( )\n+ {\n+ if( isEmpty( ) )\n+ System.out.println( "Empty tree" );\n+ else\n+ printTree( root );\n+ }\n+\n+ /**\n+ * Internal method to get element field.\n+ * @param t the node.\n+ * @return the element field or null if t is null.\n+ */\n+ @SuppressWarnings("unchecked")\n+\tprivate Comparable elementAt( AVLNode t )\n+ {\n+ return t == null ? null : t.element;\n+ }\n+\n+ /**\n+ * Internal method to insert into a subtree.\n+ * @param x the item to insert.\n+ * @param t the node that roots the tree.\n+ * @return the new root.\n+ */\n+\t@SuppressWarnings("unchecked")\n+\tprivate AVLNode insert( Comparable x, AVLNode t )\n+ {\n+ if( t == null )\n+ t = new AVLNode( x, null, null );\n+ else if( x.compareTo( t.element ) < 0 )\n+ {\n+ t.left = insert( x, t.left );\n+ if( height( t.left ) - height( t.right ) == 2 )\n+ if( x.compareTo( t.left.element ) < 0 )\n+ t = rotateWithLeftChild( t );\n+ else\n+ t = doubleWithLeftChild( t );\n+ }\n+ else if( x.compareTo( t.element ) > 0 )\n+ {\n+ t.right = insert( x, t.right );\n+ if( height( t.right ) - height( t.left ) == 2 )\n+ if( x.compareTo( t.right.element ) > 0 )\n+ t = rotateWithRightChild( t );\n+ else\n+ '..b'cate; do nothing\n+ t.height = max( height( t.left ), height( t.right ) ) + 1;\n+ return t;\n+ }\n+\n+ /**\n+ * Internal method to find the smallest item in a subtree.\n+ * @param t the node that roots the tree.\n+ * @return node containing the smallest item.\n+ */\n+ private AVLNode findMin( AVLNode t )\n+ {\n+ if( t == null )\n+ return t;\n+\n+ while( t.left != null )\n+ t = t.left;\n+ return t;\n+ }\n+\n+ /**\n+ * Internal method to find the largest item in a subtree.\n+ * @param t the node that roots the tree.\n+ * @return node containing the largest item.\n+ */\n+ private AVLNode findMax( AVLNode t )\n+ {\n+ if( t == null )\n+ return t;\n+\n+ while( t.right != null )\n+ t = t.right;\n+ return t;\n+ }\n+\n+ /**\n+ * Internal method to find an item in a subtree.\n+ * @param x is item to search for.\n+ * @param t the node that roots the tree.\n+ * @return node containing the matched item.\n+ */\n+ @SuppressWarnings("unchecked")\n+\tprivate AVLNode find( Comparable x, AVLNode t )\n+ {\n+ while( t != null )\n+ if( x.compareTo( t.element ) < 0 )\n+ t = t.left;\n+ else if( x.compareTo( t.element ) > 0 )\n+ t = t.right;\n+ else\n+ return t; // Match\n+\n+ return null; // No match\n+ }\n+\n+ /**\n+ * Internal method to print a subtree in sorted order.\n+ * @param t the node that roots the tree.\n+ */\n+ private void printTree( AVLNode t )\n+ {\n+ if( t != null )\n+ {\n+ printTree( t.left );\n+ System.out.println( t.element );\n+ printTree( t.right );\n+ }\n+ }\n+\n+ /**\n+ * Return the height of node t, or -1, if null.\n+ */\n+ private static int height( AVLNode t )\n+ {\n+ return t == null ? -1 : t.height;\n+ }\n+\n+ /**\n+ * Return maximum of lhs and rhs.\n+ */\n+ private static int max( int lhs, int rhs )\n+ {\n+ return lhs > rhs ? lhs : rhs;\n+ }\n+\n+ /**\n+ * Rotate binary tree node with left child.\n+ * For AVL trees, this is a single rotation for case 1.\n+ * Update heights, then return new root.\n+ */\n+ private static AVLNode rotateWithLeftChild( AVLNode k2 )\n+ {\n+ AVLNode k1 = k2.left;\n+ k2.left = k1.right;\n+ k1.right = k2;\n+ k2.height = max( height( k2.left ), height( k2.right ) ) + 1;\n+ k1.height = max( height( k1.left ), k2.height ) + 1;\n+ return k1;\n+ }\n+\n+ /**\n+ * Rotate binary tree node with right child.\n+ * For AVL trees, this is a single rotation for case 4.\n+ * Update heights, then return new root.\n+ */\n+ private static AVLNode rotateWithRightChild( AVLNode k1 )\n+ {\n+ AVLNode k2 = k1.right;\n+ k1.right = k2.left;\n+ k2.left = k1;\n+ k1.height = max( height( k1.left ), height( k1.right ) ) + 1;\n+ k2.height = max( height( k2.right ), k1.height ) + 1;\n+ return k2;\n+ }\n+\n+ /**\n+ * Double rotate binary tree node: first left child\n+ * with its right child; then node k3 with new left child.\n+ * For AVL trees, this is a double rotation for case 2.\n+ * Update heights, then return new root.\n+ */\n+ private static AVLNode doubleWithLeftChild( AVLNode k3 )\n+ {\n+ k3.left = rotateWithRightChild( k3.left );\n+ return rotateWithLeftChild( k3 );\n+ }\n+\n+ /**\n+ * Double rotate binary tree node: first right child\n+ * with its left child; then node k1 with new right child.\n+ * For AVL trees, this is a double rotation for case 3.\n+ * Update heights, then return new root.\n+ */\n+ private static AVLNode doubleWithRightChild( AVLNode k1 )\n+ {\n+ k1.right = rotateWithLeftChild( k1.right );\n+ return rotateWithRightChild( k1 );\n+ }\n+\n+ /** The tree root. */\n+ private AVLNode root;\n+\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/AnnotationLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/AnnotationLine.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,99 @@ +package datastructures; + +import java.util.Scanner; + +public class AnnotationLine implements Comparable<Object>{ + + String seqName, chrom, gene; + int start, end; + + public AnnotationLine(String seqName, String chrom, String gene, + int start, int end){ + this.seqName = seqName; + this.chrom = chrom; + this.gene = gene; + this.start = start; + this.end = end; + } + + public AnnotationLine(String line){ + Scanner s = new Scanner(line); + seqName = s.next(); + this.chrom = s.next(); + this.start = s.nextInt(); + this.end = s.nextInt(); + this.gene = s.next(); + } + + public String seqName() { + return seqName; + } + + public String chrom() { + return chrom; + } + + public String gene() { + return gene; + } + + public int start() { + return start; + } + + public int end() { + return end; + } + + public static AnnotationLine targetLine(String chrom, int tstart, int tend){ + return new AnnotationLine("000\t"+chrom+"\t"+tstart+"\t"+tend+"\tdummy"); + } + + public int compareTo(Object otherLine) { + AnnotationLine other = (AnnotationLine)otherLine; + + if(chrom.compareTo(other.chrom()) < 0 + && !other.gene.equals("dummy")) + return -1; + else if(chrom.compareTo(other.chrom()) > 0 + && !other.chrom().equals("dummy")) + return 1; + else{ + /* + * 1. Eine Region überlappt mit einem Gen, wenn einer der folgenden + * 3 Fälle eintritt: + * a) Targetanfang kleiner als Genanfang und Targetende größer als + * Genende. (Gen ganz im Target enthalten) + * b) Targetanfang liegt zwischen Genanfang und Genende. + * c) Targetende liegt zwischen Genanfang und Genende. + */ + + // Für Targetsuche + if(this.gene().equals("dummy") && + this.chrom().equals(other.chrom()) && ( + (this.start() <= other.start() && this.end() >= other.end()) || + (this.start() >= other.start() && this.start() <= other.end()) || + (this.end() >= other.start() && this.end() <= other.end()) + ) + ) + return 0; + // Für Gensuche zu Insertzwecken. + else if(start < other.start()) + return -1; + else if(start > other.start()) + return 1; + else{ + if(end < other.end()) + return -1; + else if(end > other.end()) + return 1; + else return 0; + } + } + } + + public String toString(){ + return seqName +"\t" + chrom + "\t" + start + "\t" + end + "\t" + gene; + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/Format.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/Format.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,32 @@ +package datastructures; + +public enum Format{ + type("type"), + sam("sam"), + maq("maq"), + megablast("megablast"), + eland("eland"), + roche("roche"), + genome("genome"), + target("target"), + invalid("invalid"); + + private String f; + + Format(String format){ + this.f = format; + } + + public Format compile(String f){ + this.f = f; + try{ + return Format.valueOf(this.f); + }catch(IllegalArgumentException iae){ + return invalid; + } + } + + public boolean equals(Format other){ + return this.f.equals(other.f); + } +}; |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/Frame.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/Frame.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,94 @@ +package datastructures; + +/** + * Used for various purposes. + * + * @author Ali Abdallah + * @version 01.2011 + * @since jdk 1.6.0 + */ +public class Frame { + + // Self explanatory. + protected int start; + protected int end; + protected int length; + + /** + * Constructs a frame with start position "start", length "length" and + * end position "start+length-1". + * @param start the start position of the frame. + * @param length the length of the frame. + */ + public Frame(int start, int length) { + this.start = start; end = start+length-1; + this.length = length; + } + + /** + * Verify if this frame overlaps the frame specified in the parameter. + * @param f the frame which potentially overlaps the calling frame. + * @return true if the two frames overlap each other and false otherwise. + */ + public boolean overlaps(Frame f){ + return (end >= f.start() && start < f.end()); + } + + /** + * Computes the size of the overlap area. + * @param f the frame overlapping the calling frame. + * @return the size of the overlap if an overlap exists and -1 otherwise. + */ + public int overlapSize(Frame f){ + if(this.overlaps(f)){ + int s = Math.max(start, f.start()); + int e = Math.min(end, f.end()); + return e-s+1; + } + return -1; + } + + /** + * Unify the calling frame with the frame specified in the parameter. + * @param f the frame to be unified with the calling frame. + * @return the union of the calling frame and f. + */ + public Frame unify(Frame f){ + return + new Frame(Math.min(this.start, f.start), + Math.max(this.end,f.end)-Math.min(this.start, f.start)+1); + } + + /** + * self explanatory + * @return start of the frame. + */ + public int start(){ + return start; + } + + /** + * self explanatory + * @return end of the frame. + */ + public int end(){ + return end; + } + + /** + * self explanatory + * @return length of the frame. + */ + public int length(){ + return length; + } + + /** + * Make a string representation of the frame. + * @return a string representation of the string. + */ + public String toString(){ + return start+":"+end; + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/GenomeFrame.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/GenomeFrame.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,87 @@ +package datastructures; + +import java.util.Vector; + +/** + * @author Ali Abdallah + * @version 01.2011 + * @since jdk 1.6.0 + */ + +public class GenomeFrame extends Frame{ + + int limit; + Vector<Integer> hits; + + public GenomeFrame(int start, int length) { + super(start, length); + limit = end; + hits = new Vector<Integer>(length); + hits.setSize(length); + for(int i = 0; i < length; i++){ + hits.set(i, 0); + } + } + + public int getHit(int base){ + if(base-start < hits.size()) + return hits.get(base-start); + else + return -1; + } + + public void setHit(int base, int bhits){ + if(base-start < hits.size()){ + hits.set(base-start, bhits); + } + } + + public boolean contains(ReadFrame r){ + return (start <= r.start() && end >= r.end()); + } + + public boolean overlaps(ReadFrame r){ + return (end >= r.start() && end < r.end()); + } + + + + public void addBases(int nr){ + for(int i = 0; i < nr; i++){ + hits.add(1); + } + } + + public String toString(){ + return start+":"+end+" ("+limit+")"; + } + + + public void updateHits(ReadFrame read) { + for(int base = read.start(); base <= read.end(); base++){ + setHit(base, getHit(base)+1); + } + } + + public void updateFrameFromRightEnd(ReadFrame readF) { + // TODO Auto-generated method stub + for(int i = end+1; i <= readF.end(); i++) + hits.add(0); + end = readF.end(); + } + + public boolean limitExceeded(ReadFrame readF) { + return readF.start() > limit; + } + + public void updateFrameFromBothEnds(ReadFrame readF, int length) { + for(int i = end-readF.start()+1; i < length; i++ ) + hits.add(0); + for(int i = 0; i < readF.start()-start; i++) + hits.remove(0); + start = readF.start(); + end = start+length-1; + limit = end; + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/GenomeLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/GenomeLine.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,57 @@ +package datastructures; + +import java.util.Scanner; + +public class GenomeLine implements Line { + + boolean misformat = false; + String seqName, chrom, gene; + int start, end; + + //fw.write(field(1)+"\t"+field(3)+"\t" + // +field(5)+"\t"+field(6)+"\t"+field(13)+"\r\n"); + + public GenomeLine(String line){ + Scanner s = new Scanner(line); + if(line.startsWith("#")) misformat = true; + else + try{ + seqName = s.next();s.next(); + chrom = s.next();s.next(); + start = s.nextInt(); + end = s.nextInt();s.next();s.next();s.next();s.next();s.next();s.next(); + gene = s.next();} + catch(Exception e){ + misformat = true; + } + } + + public boolean valid(){ + return misformat == false; + } + + public String chrom() { + return chrom; + } + + public int end() { + return end; + } + + public int start() { + return start; + } + + public String gene(){ + return gene; + } + + public String seqName(){ + return seqName; + } + + public String toString(){ + return seqName + "\t" + chrom + "\t" + start + "\t" + end + "\t" + gene; + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/Line.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/Line.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,9 @@ +package datastructures; + +public interface Line { + + public String chrom(); + public int start(); + public int end(); + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/Read.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/Read.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,96 @@ +package datastructures; + +import java.io.File; +import java.io.IOException; +import java.lang.InterruptedException; +import java.util.Scanner; +import java.util.Vector; + +public class Read implements Comparable<Object> { + + String query; + int flag; + String rname; + int pos; + int mapq; + String cigar; + String rnext; + int pnext; + int tlen; + String seq; + String qual; + Vector<String> optional; + + public Read(String line) { + Scanner s = new Scanner(line); + query = s.next(); + flag = s.nextInt(); + rname = s.next(); + pos = s.nextInt(); + mapq = s.nextInt(); + cigar = s.next(); + rnext = s.next(); + pnext = s.nextInt(); + tlen = s.nextInt(); + seq = s.next(); + qual = s.next(); + if (s.hasNext()) { + optional = new Vector<String>(); + while (s.hasNext()) { + optional.add(s.next()); + } + } + } + + public String getRname() { + return rname; + } + + public int getPos() { + return pos; + } + + @Override + public int compareTo(Object o) { + return 0; + } + + public static void sort(File input) { + Runtime rt = Runtime.getRuntime(); + try { + String rawOutput = input.getAbsolutePath(), + tmpD = input.getParentFile().getAbsolutePath(), + outputName = input.getName(), + pathname = input.getParentFile().getAbsolutePath() + "/" + + outputName + "Sorted"; + + input = new File(pathname); + + if (!input.exists()) + input.createNewFile(); + + String command = "sort -k3,3 -k4n,4 -T " + tmpD + " " + rawOutput+" > "+pathname; + Process p = rt.exec(command); + try{p.waitFor();} + catch(InterruptedException e){e.printStackTrace();} + System.out.println("Fertig"); + /* Scanner ps = new Scanner(p.getInputStream()); + FileWriter fw = new FileWriter(input); + + while (ps.hasNextLine()) { + String nextLine = ps.nextLine(); + fw.write(nextLine + "\r\n"); + } + + fw.close(); */ + + new File(rawOutput).delete(); + new File(pathname).renameTo(new File(rawOutput)); + System.out.println("File " + new File(rawOutput).getAbsolutePath() + + " sorted\n"); + + } catch (IOException e1) { + e1.printStackTrace(); + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/ReadFrame.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/ReadFrame.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,23 @@ +package datastructures; + +public class ReadFrame extends Frame{ + + private String chrom, name; + + public ReadFrame(String name,String chrom, int start, int end) { + super(start, end-start+1); + this.chrom = chrom; this.name = name; + } + + public String chrom(){ + return chrom; + } + + public String name(){ + return name; + } + + public int size(){ + return end-start+1; + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/ReadLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/ReadLine.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,73 @@ +package datastructures; + +import java.util.Scanner; + +/** + * Represents a read line from the read alignment file. + * + * @author Ali Abdallah + * @version 03.08.2011 + * @since Java 1.6 + */ + +public class ReadLine implements Line { + + String + /** + * Query (pair) name. + */ + name, + /** + * Reference sequence name. + */ + chrom; + /** + * Start position of the read. + */ + int start, + /** + * End Position of the read. + */ + end, + /** + * Length of the read. + */ + length; + + public ReadLine(String line){ + // line format: + // qname flag rname pos mapq cigar mrnm mpos isize seq qual tag + Scanner s = new Scanner(line); + name = s.next(); + s.next(); + chrom = s.next(); + start = s.nextInt(); + s.next(); s.next();s.next();s.next();s.next(); + length = s.next().length(); + end = start+length-1; + } + + public String name(){ + return name; + } + + public String chrom() { + return chrom; + } + + public int end() { + return end; + } + + public int start() { + return start; + } + + public int length(){ + return length; + } + + public String toString(){ + return name+"\t"+chrom+"\t"+start+"\t"+end; + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/ReducedReadLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/ReducedReadLine.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,89 @@ +package datastructures; + +import java.util.Scanner; +import exceptions.ChromosomeFormatException; +import exceptions.ChromosomeNotFoundException; +import exceptions.RangeFormatException; +import exceptions.RangeLimitNotFoundException; + +/** + * Represents a read Line from the read alignment file. + * + * @author Ali Abdallah + * @version 22.07.2011 + * @since Java 1.6 + */ +public class ReducedReadLine implements Line{ + + String line; + String rName; + String chrom; + int start, end; + + public ReducedReadLine(String line) throws ChromosomeFormatException, + ChromosomeNotFoundException, + RangeFormatException, + RangeLimitNotFoundException{ + this.line = line; + Scanner s = new Scanner(line); + if(s.hasNext()) + rName = s.next(); + if(s.hasNext()){ + chrom = s.next(); + if(!(chrom.toLowerCase().startsWith("chr") || chrom.equals("*"))) + throw new ChromosomeFormatException(chrom); + } + else + throw new ChromosomeNotFoundException(); + + if(s.hasNextInt()){ + start = s.nextInt(); + if(start < 0){ + throw new RangeFormatException("Start position must be a positive integer."); + } + } + else if(!s.hasNext()) + throw new RangeLimitNotFoundException("No range start found!"); + else + throw new RangeFormatException("Found: "+start+". Start position ist not an integer. " + + "It must be a positive integer."); + + if(s.hasNextInt()){ + end = s.nextInt(); + if(end < 0){ + throw new RangeFormatException("End position must be a positive integer."); + } + } + else if(!s.hasNext()) + throw new RangeLimitNotFoundException("No range end found!"); + else + throw new RangeFormatException("Found: "+end+". End position ist not an integer. " + + "It must be a positive integer."); + } + + public String chrom(){ + return chrom; + } + + public int start(){ + return start; + } + + public int end(){ + return end; + } + + public String toString(){ + return line; + } + + public boolean isForwardRead(){ + return start <= end; + } + + public String name() { + // TODO Auto-generated method stub + return rName; + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/datastructures/TargetLine.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/datastructures/TargetLine.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,87 @@ +package datastructures; + +import java.util.Scanner; + +import exceptions.ChromosomeFormatException; +import exceptions.ChromosomeNotFoundException; +import exceptions.NullOrNegativeRangeException; +import exceptions.RangeFormatException; +import exceptions.RangeLimitNotFoundException; + +/** + * Represents a target Line from the target file. + * + * @author Ali Abdallah + * @version 19.07.2011 + * @since Java 1.6 + */ + +public class TargetLine { + + String line; + String chrom; + int start, end; + + public TargetLine(String line) throws RangeFormatException, + ChromosomeFormatException, + ChromosomeNotFoundException, + RangeLimitNotFoundException, + NullOrNegativeRangeException { + this.line = line; + Scanner s = new Scanner(line); + if(s.hasNext()){ + chrom = s.next(); + if(!(chrom.toLowerCase().startsWith("chr") || chrom.equals("*"))) + throw new ChromosomeFormatException(chrom); + } + else + throw new ChromosomeNotFoundException(); + + if(s.hasNextInt()){ + start = s.nextInt(); + if(start < 0){ + throw new RangeFormatException("Start position of the target must be a " + + "positive integer."); + } + } + else if(!s.hasNext()) + throw new RangeLimitNotFoundException("No target range start found!"); + else + throw new RangeFormatException("Target start position" + + " is not an integer. It must be a positive" + + " integer."+ " Found: "+start); + + if(s.hasNextInt()){ + end = s.nextInt(); + if(end < 0){ + throw new RangeFormatException("Target end position must be a positive " + + "integer."+ " Found: "+end); + } + } + else if(!s.hasNext()) + throw new RangeLimitNotFoundException("No range end found!"); + else + throw new RangeFormatException("Found: "+end+". End position ist not an integer. " + + "It must be a positive integer."); + + if(start >= end) + throw new NullOrNegativeRangeException("Target line \""+line+"\""); + } + + public String chrom(){ + return chrom; + } + + public int start(){ + return start; + } + + public int end(){ + return end; + } + + public String toString(){ + return line; + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/ChromosomeException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/ChromosomeException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,16 @@ +package exceptions; + +public class ChromosomeException extends Exception { + + private static final long serialVersionUID = -2075266777182180011L; + + public ChromosomeException(String curr){ + super(curr); + } + + public ChromosomeException(){ + super(); + System.out.println(this.getMessage()); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/ChromosomeFormatException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/ChromosomeFormatException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,12 @@ +package exceptions; + +public class ChromosomeFormatException extends ChromosomeException { + + private static final long serialVersionUID = 2920204775834301041L; + + public ChromosomeFormatException(String curr){ + super("The format of the chromosome name is invalid\n" + + "Found chromosome name is: "+curr); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/ChromosomeMismatchException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/ChromosomeMismatchException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,12 @@ +package exceptions; + +public class ChromosomeMismatchException extends ChromosomeException { + + private static final long serialVersionUID = -2902763382812748929L; + + public ChromosomeMismatchException(){ + super("The chromosome names in target and alignment are different. " + + "The naming must be consistent."); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/ChromosomeNotFoundException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/ChromosomeNotFoundException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,11 @@ +package exceptions; + +public class ChromosomeNotFoundException extends ChromosomeException { + + private static final long serialVersionUID = 1L; + + public ChromosomeNotFoundException(){ + super("No chromosomes found."); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/FileFormatException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/FileFormatException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,11 @@ +package exceptions; + +public class FileFormatException extends Exception { + + private static final long serialVersionUID = -9091546054856311514L; + + public FileFormatException(String s) { + super("Datei Format \""+s+"\" wird nicht unterstützt"); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/GenomeAnnotationException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/GenomeAnnotationException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,11 @@ +package exceptions; + +public class GenomeAnnotationException extends Throwable { + + private static final long serialVersionUID = -9050133395128460361L; + + public GenomeAnnotationException(){ + super("The specified genome annotation is invalid\n"); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/NullOrNegativeRangeException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/NullOrNegativeRangeException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,16 @@ +package exceptions; + +public class NullOrNegativeRangeException extends RangeException { + + private static final long serialVersionUID = 1L; + + public NullOrNegativeRangeException(){ + super("The start position is bigger than or equal to the end position."); + } + + public NullOrNegativeRangeException(String message){ + super( message + "\n" + + "The start position is bigger than or equal to the end position."); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/RangeException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/RangeException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,15 @@ +package exceptions; + +public class RangeException extends Exception { + + private static final long serialVersionUID = -8250851930700369771L; + + public RangeException(){ + super(); + } + + public RangeException(String s){ + super(s); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/RangeFormatException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/RangeFormatException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,15 @@ +package exceptions; + +public class RangeFormatException extends RangeException { + + private static final long serialVersionUID = -7603714654119196278L; + + public RangeFormatException(){ + super("The range limits are misformatted."); + } + + public RangeFormatException(String message){ + super( message + "\n" + + "The range limits are misformatted."); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/exceptions/RangeLimitNotFoundException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/exceptions/RangeLimitNotFoundException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,12 @@ +package exceptions; + + +public class RangeLimitNotFoundException extends RangeException { + + private static final long serialVersionUID = -4135602280097231477L; + + public RangeLimitNotFoundException(String string) { + super(string); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/filters/Filter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/filters/Filter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,45 @@ +package filters; + +/** + * This abstract class is a framework for classes. It filters versatile formats + * into a single reduced format compatible with converter classes, such as the + * Read2Wig class. + * + * @author Ali Abdallah + * @version 01.08.2011 + * @since jdk 1.6 + */ +public abstract class Filter { + + private String + /** + * The path of the input file. + */ + input, + /** + * The path of the output file. + */ + output; + + public Filter(String input, String output){ + this.input = input; + this.output = output; + } + + public abstract void filter(); + + public abstract void sort(); + + + public String getInputPath() { + return input; + } + + public String getOutputPath() { + return output; + } + + public void setInputPath(String input){ + this.input = input; + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/filters/GenomeFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/filters/GenomeFilter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,91 @@ +package filters; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Scanner; +import datastructures.GenomeLine; + +public class GenomeFilter extends Filter{ + + private File input, output; + + + public GenomeFilter(String inputFileName, String outputFileName) { + super(inputFileName, outputFileName); + input = new File(getInputPath()); + output = new File(getOutputPath()); + } + + public void filter() { + + Scanner s = null; + try { + s = new Scanner(input); + + FileWriter fw = null; + fw = new FileWriter(getOutputPath()); + + while(s.hasNextLine()){ + try { + GenomeLine gl = new GenomeLine(s.nextLine()); +// if(gl.chrom().equals("chr10")) System.out.println(gl); + if(gl.valid()) fw.write(gl+"\n"); + } catch (IOException e) { + e.printStackTrace(); + } + } + fw.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + System.out.println("GENOME ANNOTATION FILE:"); + System.out.println(getInputPath() + " reduced to " + getOutputPath()); + sort(); + } + + public static void main(String[] args){ + GenomeFilter gf = + new GenomeFilter("/home/abdallah/Desktop/input/refGene.txt", + "/home/abdallah/Desktop/output/refGeneReduced.txt"); + gf.filter(); + } + + public void sort() { + Runtime rt = Runtime.getRuntime(); + try { + String rawOutput = getOutputPath(); + String outputName = output.getName(); + String tmpD= output.getParentFile().getAbsolutePath(); + String pathname = output.getParentFile().getAbsolutePath()+"/"+outputName+"Sorted"; + output = new File(pathname); + if(!output.exists()) output.createNewFile(); + String command = "sort -k2,2 -k3n,3 -k5,5 -T "+tmpD+" "+rawOutput; + Process p = rt.exec(command); + Scanner ps = new Scanner(p.getInputStream()); + FileWriter fw = new FileWriter(output); + while(ps.hasNextLine()){ + String nextLine = ps.nextLine(); + fw.write(nextLine+"\n"); + } + fw.close(); + + new File(rawOutput).delete(); + new File(pathname).renameTo(new File(rawOutput)); + System.out.println("Reduced file "+new File(rawOutput).getAbsolutePath()+" sorted\n"); + + } catch (IOException e1) { + e1.printStackTrace(); + } + } + + public String toString(){ + return "GenomeFilter"; + } + + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/filters/ReadFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/filters/ReadFilter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,177 @@ +package filters; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Scanner; +import datastructures.ReadLine; + +public class ReadFilter extends Filter{ + + File input, output; + + /** + * Constructs a SamAdapter object. The output of an adaption is written to the + * given file outputFileName. + * + * @param inputFileName the name of the read alignment input file. + * @param outputFileName the name of the output file containing the reduced + * format of the read alignment file. It must ends with ".red". + */ + public ReadFilter(String inputFileName, String outputFileName) { + super(inputFileName, outputFileName); + input = new File(inputFileName); + output = new File(outputFileName); + } + + /** + * <P> + * Uses ReadLine zu reduce each line of the read alignment file to following format:<BR> + * <name> <chrom> <start> <end> (tab delimited). + * </P> + * In the following we list the 12 fields of the sam-alignment-file. We mark the fields we are + * interessted in with (!!): + * <PRE> + * 1. <QNAME> : Query pair NAME if paired; or Query NAME if unpaired (Ex: 6:105:18438:14421) (!!) + * 2. <FLAG> : bitwise FLAG a₀a₁a₂a₃a₄a₅a₆a₇a₈a₉a₁₀ (Ex: 0 forward, 16 reverse strand) + * a₀ : the read is paired in sequencing, (no matter whether it is mapped in a pair) + * a₁ : the read is mapped in a proper pair + * a₂ : the query sequence itself is unmapped + * a₃ : the mate is unmapped + * a₄ : strand of the query (0 for forward; 1 for reverse strand) + * a₅ : strand of the mate + * a₆ : the read is the first read in a pair + * a₇ : the read is the second read in a pair + * a₈ : the alignment is not primary + * a₉ : the read fails platform/vendor quality checks + * a₁₀: the read is either a PCR duplicate or an optical duplicate + * 3. <RNAME> : Reference sequence NAME (Ex: chr10) (!!) + * 4. <POS> : 1-based leftmost POSition/coordinate of the clipped sequence (Ex: 60041) (!!) + * 5. <MAPQ> : MAPping Quality (Ex: 0) + * (phred-scaled posterior probability that the mapping position of this read is incorrect) + * 6. <CIGAR> : extended CIGAR string (Ex: 150M) + * 7. <MRNM> : Mate Reference sequence NaMe; “=” if the same as <RNAME> (Ex:*) + * 8. <MPOS> : 1-based leftmost Mate POSition of the clipped sequence (Ex: 0) + * 9. <ISIZE> : inferred Insert SIZE (Ex: 0) + * 10. <SEQ> : query SEQuence; “=” for a match to the reference; n/N/. for ambiguity; cases are not maintained (!!) + * (Ex: TGTTGTTGTTATTTCTGAATGACATTTACTTTGCTGCTCTTTATTTTGCG + * TATTTAAAACTATTAGATCGTGTGATTATATTTGACAGGTCTTAATTGAC + * GCGCTGTTCAGCCCTTTGAGTTCGGTTGAGTTTTGTGTTGGAGAATTTTC) + * 11. <QUAL> : query QUALity; ASCII-33 gives the Phred base quality + * (Ex: /.8349-7:95@=8999;1:=;===AABD:=@A;>AD:E:9@==69<;@B3CBC@B8B;B89=8=3;@@@.:->>B? + * C4CBB8EDGDD8GDEEDEEE8EBA9B???=B;,8:+5;;A??>?#############################) + * 12. [<TAG>:<VTYPE>:<VALUE> [...]]: TAG/Value TYPE/match <VTYPE> (space allowed) + * (Ex: XT:A:R NM:i:2 X0:i:2 X1:i:0) + * </PRE> + */ + public void filter() { + FileWriter fw = null; + Scanner s = null; + + try { + s= new Scanner(input); + } catch (FileNotFoundException e) { + System.err.println("sam file not found"); + e.printStackTrace(); + } + + try { + if(output == null){ + output = new File(input.getName(). + substring(0,input.getName().lastIndexOf("."))+".rsam"); + } + + fw = new FileWriter(output); + + } catch (IOException e) { + System.err.println("Error generating rsam file"); + e.printStackTrace(); + } + + String rawline; + ReadLine line = null; + + do{ + rawline = s.nextLine(); + }while(rawline.startsWith("@")); + + do{ + try { + line = new ReadLine(rawline); + fw.write(line+"\r\n"); + } catch (IOException e) { + System.err.println("Error writing reduced form of:\n"+rawline); + e.printStackTrace(); + } + if(s.hasNextLine()) + rawline = s.nextLine(); + }while(s.hasNextLine()); + + + try { + fw.write(line +"\r\n"); + } catch (IOException e) { + System.err.println("Error writing reduced form of:\n"+line); + e.printStackTrace(); + } + + try { + fw.close(); + } catch (IOException e) { + System.err.println("Error closing file"); + e.printStackTrace(); + } + s.close(); + + System.out.println("READS FILE:"); + System.out.println(input.getAbsolutePath()+" reduced to "+ + output.getAbsolutePath()); + sort(); + } + + + public void sort() { + Runtime rt = Runtime.getRuntime(); + try { + String rawOutput = output.getAbsolutePath(); + String outputName = output.getName(); + String pathname = output.getParentFile().getAbsolutePath()+"/"+outputName+"Sorted"; + + output = new File(pathname); + String tmpD=output.getParentFile().getAbsolutePath(); + + if(!output.exists())output.createNewFile(); + String command = "sort -k2,2 -k3n,3 -T "+tmpD+" "+rawOutput; + Process p = rt.exec(command); + Scanner ps = new Scanner(p.getInputStream()); + + FileWriter fw = new FileWriter(output); + while(ps.hasNextLine()){ + String nextLine = ps.nextLine(); + fw.write(nextLine+"\n"); + } + fw.close(); + + Scanner psStdErr=new Scanner(p.getErrorStream()); + while(psStdErr.hasNextLine()){ + String errLine=psStdErr.nextLine(); + System.out.println(errLine); + } + + new File(rawOutput).delete(); + new File(pathname).renameTo(new File(rawOutput)); + System.out.println("Reduced file "+new File(rawOutput).getAbsolutePath()+" sorted\n"); + + } catch (IOException e1) { + e1.printStackTrace(); + } + } + + + public String toString(){ + return "ReadFilter"; + } + + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/filters/TargetFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/filters/TargetFilter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,195 @@ +package filters; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Scanner; +import middlewares.Misc; +import datastructures.Frame; +import datastructures.TargetLine; +import exceptions.ChromosomeFormatException; +import exceptions.ChromosomeNotFoundException; +import exceptions.NullOrNegativeRangeException; +import exceptions.RangeFormatException; +import exceptions.RangeLimitNotFoundException; + +public class TargetFilter extends Filter { + + // variables used for test purposes. + public int target_size, target_regions; + + public TargetFilter(String input, String output) { + super(input, output); + target_size = 0; + target_regions = 0; + } + + public void filter() { + try { + + Scanner s = new Scanner(new File(getInputPath())); + FileWriter fw; + System.out.println("TARGET REGIONS FILE:"); + /* + * 1. STEP: + * a. Remove all but the first track. + * b. Remove browser and track header lines of the first track + * c. Save the output in the output directory and return the path of the output file. + */ + String finput = filterTracks(s); + setInputPath(finput); + + /* + * 2. STEP: + * a. Sort the target region file lexicographically by chromomose-name. + * b. If chr-names are identical then numerically by the start position. + * c. If start positions are identical then numerically by the end position. + */ + sort(); + + /* + * 3. STEP: + * Unify all overlapping target regions. + */ + s = new Scanner(new File(getInputPath())); + fw = new FileWriter(getOutputPath()); + // for all target regions do the following: + if (s.hasNextLine()) { + try { + // parse the current target region. + TargetLine tl = new TargetLine(s.nextLine()); + // create a new frame representing the current target region. + Frame union = new Frame(tl.start(), tl.end() - tl.start() + 1); + String chrom = tl.chrom(); + while (s.hasNextLine()) { + // parse the next target region. + tl = new TargetLine(s.nextLine()); + // create the corresponding frame. + Frame nextTarget = new Frame(tl.start(), tl.end() - tl.start() + 1); + String nextChrom = tl.chrom(); + // if current and next overlap each other. + if (union.overlaps(nextTarget) && chrom.equals(nextChrom)) { + // unify regions. + union = union.unify(nextTarget); + // go to the next iteration. + continue; + } + // else + // write the computed overlap-free target region. + target_size += union.end()-union.start()+1; + target_regions++; + fw.write(chrom +"\t"+ union.start() +"\t"+ union.end() +"\n"); + // refresh the union and chrom variables for the next computation. + union = nextTarget; + chrom = nextChrom; + } + + try { + target_size += union.end()-union.start()+1; + target_regions++; + fw.write(chrom+"\t"+union.start()+"\t"+union.end()+"\n"); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + fw.close(); + } catch (RangeFormatException e) { + e.printStackTrace(); + } catch (ChromosomeFormatException e) { + e.printStackTrace(); + } catch (ChromosomeNotFoundException e) { + e.printStackTrace(); + } catch (RangeLimitNotFoundException e) { + e.printStackTrace(); + } catch (NullOrNegativeRangeException e) { + e.printStackTrace(); + } + } + } catch (FileNotFoundException fnfe) { + fnfe.printStackTrace(); + } catch (IOException ioe) { + ioe.printStackTrace(); + } + System.out.println(getInputPath()+" reduced to "+getOutputPath()); + } + + /** + * 1. Removes all but the first track. + * 2. Removes browser and track header lines of the first track + * 3. Saves the output in the output directory and return the path of the output file. + * + * @param s the scanner reading the raw file. + * @return the path of the output file. + * @throws IOException if writing fails. + */ + private String filterTracks(Scanner s) throws IOException { + + String finput = Misc.path(getOutputPath())+ Misc.prefix(getInputPath()) + ".bed"; + FileWriter fw = new FileWriter(finput); + // Counters for browser header lines and track header lines. + int browserRead = 0; + int trackRead = 0; + while (s.hasNextLine()) { + String line = s.nextLine(); + // Count browser lines. + if (line.startsWith("browser")) { + browserRead++; + // Count header lines. + } else if (line.startsWith("track")) { + trackRead++; + } else { + // Write lines as long as they corresponds to the first track. + if (trackRead <= 1 && browserRead <= 1) + fw.write(line + "\n"); + else + // Otherwise cancel the computation. + break; + } + } + fw.close(); + return finput; + } + + /** + * 1. Sort the target region file lexicographically by chromomose-name. + * 2. If chr-names are identical then numerically by the start position. + * 3. If start positions are identical then numerically by the end position. + */ + public void sort() { + Runtime rt = Runtime.getRuntime(); + try { + String unsorted = getInputPath(); + String tmpD = new File(getOutputPath()).getParentFile().getAbsolutePath(); + String sorted = tmpD+Misc.slash(tmpD)+Misc.prefix(unsorted)+"Sorted"; + setInputPath(sorted); + + if(!new File(getInputPath()).exists()) + new File(getInputPath()).createNewFile(); + + String command = "sort -k1,1 -k2n,2 -k3n,3 -T "+tmpD+" "+unsorted; + Process p = rt.exec(command); + Scanner ps = new Scanner(p.getInputStream()); + FileWriter fw = new FileWriter(getInputPath()); + while(ps.hasNextLine()){ + String nextLine = ps.nextLine(); + fw.write(nextLine+"\n"); + } + fw.close(); + new File(sorted).renameTo(new File(unsorted)); + setInputPath(unsorted); + System.out.println("Target file "+new File(unsorted).getAbsolutePath()+" sorted"); + + } catch (IOException e1) { + e1.printStackTrace(); + } + } + + public static void main(String[] args){ + new TargetFilter("/home/abdallah/Desktop/input/Agilent_SureSelect_50Mb.bed", + "/home/abdallah/Desktop/output/Agilent_SureSelect_50Mb_Output.bed") + .filter(); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/middlewares/GeneExtractor.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/middlewares/GeneExtractor.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,68 @@ +package middlewares; +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import datastructures.AVLTree; +import datastructures.AnnotationLine; +import datastructures.TargetLine; + +/** + * + * Generate a AVL-Tree for fast extraction of genes (logarithmic time). + * + * @author Ali Abdallah + * @version 0.4.5, 14.07.2011 + * @since jdk 1.6.0 + * + */ + +public class GeneExtractor { + + /** + * The path of the genome annotation file. + */ + String genomeAnnotation; + + /** + * The avl tree representing the genome annotation file. + */ + AVLTree genesTree; + + /** + * The scanner scanning the genome file. + */ + Scanner s; + + /** + * Constructs the avl-tree based on the genome annotation file. + * @param genomeAnnotation the genome annotation file. + */ + public GeneExtractor(String genomeAnnotation) { + genesTree = new AVLTree(); + this.genomeAnnotation = genomeAnnotation; + try { + s = new Scanner(new File(genomeAnnotation)); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + while (s.hasNextLine()) { + genesTree.insert(new AnnotationLine(s.nextLine())); + } + s.close(); + } + + /** + * Search the tree for a gene overlapping the specified target. + * + * @param tl the target line of the current target. + * @return the gene overlapping the specified target, if it exists and + * "unknown" otherwise. + */ + public String extractGene(TargetLine tl) { + AnnotationLine a = + (AnnotationLine) genesTree.find(new AnnotationLine + ("*", tl.chrom(), "dummy", tl.start(), tl.end())); + return ((a != null) ? a.gene() : "unknown"); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/middlewares/HitsCounter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/middlewares/HitsCounter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,105 @@ +package middlewares; +import java.util.Vector; + +/** + * Counts the number of bases hit at least 1, 5, 10, 20 or 30 times. + * + * @author Ali Abdallah + * @version 22.07.2011 + * @since Java 1.6 + */ +public class HitsCounter { + + /** + * The hits vector with the number of bases hit at different levels. + */ + private Vector<Integer> hits; + + /** + * The number of bases hit at the five different levels for a specific + * target. + */ + private Vector<Integer> currentHits; + + /** + * The levels at which the number of bases is counted. + */ + private int[] levels = { 1, 5, 10, 20, 30 }; + + /** + * Creates and initializes a hit counter. + */ + public HitsCounter() { + hits = new Vector<Integer>(); + currentHits = new Vector<Integer>(); + for (int i = 0; i < levels.length; i++) { + hits.add(0); + currentHits.add(0); + } + } + + /** + * Update the number of bases hit at the specified different levels. + */ + public void updateHits() { + for (int i = 0; i < hits.size(); i++) { + hits.set(i, hits.get(i) + currentHits.get(i)); + } + } + + /** + * Reset the number of bases hit at the specified different leverls for + * a specific target for user for the next target. + */ + public void resetCurrentHits() { + currentHits = new Vector<Integer>(); + for (int i = 0; i < levels.length; i++) { + currentHits.add(0); + } + } + + /** + * Increments the number of bases hit at some levels by one, if the number + * of hits on this base reach or exceed this level. + * + * @param hitsOnBase + */ + public void updateCurrentHits(int hitsOnBase) { + for (int i = 0; i < currentHits.size(); i++) { + if (hitsOnBase >= levels[i]) { + currentHits.set(i, currentHits.get(i) + 1); + } + } + } + + // Index of the bases level of the current target. + int currHit = 0; + + /** + * @return the number of bases hit at the next higher level in the current + * target. + */ + public int getNextLevelCurrentHits() { + if (currHit < currentHits.size()) + return currentHits.get(currHit++); + else { + currHit = 1; + return currentHits.get(0); + } + } + + // Index of the bases level of the target. + int hit = -1; + + /** + * @return the number of bases hit at the next higher level. + */ + public int getNextLevelHits() { + if (++hit < hits.size()) { + return hits.get(hit); + } else { + return (hit = -1); + } + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/middlewares/Misc.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/middlewares/Misc.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,206 @@ +package middlewares; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Scanner; + +import datastructures.ReducedReadLine; +import datastructures.TargetLine; +import exceptions.ChromosomeFormatException; +import exceptions.ChromosomeNotFoundException; +import exceptions.NullOrNegativeRangeException; +import exceptions.RangeFormatException; +import exceptions.RangeLimitNotFoundException; + +/** + * Miscellaneous methods for different uses. + * + * @author Ali Abdallah + * @version 01.2011 + * @since jdk 1.6.0 + */ +public class Misc { + + /** + * Make the first letter big, if possible. nGSrich -> NGSrich. + * + * @param s the string + * @return the same string with the first letter big. + */ + public static String bigFirst(String s) { + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + + /** + * Creates a shortcut for the file with a different file extension. + * + * @param fName the original file name. + * @param newExt the new extension of the file. + * @param dir the directory of the mad link. + * @return a link to the file fName with a different extension. + */ + public static File rename(String fName, String newExt, String dir) { + + String inDirShortCut = dir + Misc.slash(dir); + String fShortcutName = inDirShortCut + Misc.prefix(fName) + "." + + newExt; + Runtime r = Runtime.getRuntime(); + try { + r.exec("ln -s " + fName + " " + fShortcutName); + } catch (IOException e) { + e.printStackTrace(); + } + try { + Thread.sleep(100); + } catch (InterruptedException e) { + e.printStackTrace(); + } + return new File(fShortcutName); + } + + /** + * @return the path of the bin directory of this software. + */ + public static String binDir() { + URL url = new Misc().getClass().getResource("Misc.class"); + String path = url.toString().substring(url.toString().indexOf(":") + 1); + path = path.substring(0, path.lastIndexOf("/")); + + return path.substring(0, path.lastIndexOf("/")); + + } + + /** + * @return the path of this software. + */ + public static String scriptDir() { + URL url = new Misc().getClass().getResource("../NGSrich.class"); + String path = url.toString().substring(url.toString().indexOf(":") + 1); + path = path.substring(0, path.lastIndexOf("/")); + return path.substring(0, path.lastIndexOf("/")+1); + + } + + public static void main(String[] args) { + System.out.println(scriptDir()); + } + + /** + * @param path + * @return extends the path by a slash at the end, in the case it don't + * exists. + */ + public static String slash(String path) { + return (path.endsWith("/") ? "" : "/"); + } + + /** + * @return the name of the host. + */ + public static String getHostName() { + Runtime rt = Runtime.getRuntime(); + String erg = ""; + try { + File f = new File("hostname.sh"); + FileWriter fw = new FileWriter(f); + + fw.write("#!/bin/bash\r\nproc=$(hostname -s).$$\r\necho $proc"); + fw.close(); + Process p = rt.exec("chmod 700 " + f.getAbsolutePath()); + p = rt.exec("sh " + f.getAbsolutePath()); + + Scanner s = new Scanner(p.getInputStream()); + + while (s.hasNextLine()) { + erg += (s.nextLine()); + } + s.close(); + + f.delete(); + } catch (IOException e) { + e.printStackTrace(); + } + return erg; + } + + /** + * @param fileName + * @return the extension of the file. + */ + public static String suffix(String fileName) { + return fileName.substring(fileName.lastIndexOf(".") + 1); + } + + /** + * @param fileName + * @return the name of the file without the extension. + */ + public static String prefix(String fileName) { + return fileName.substring(fileName.lastIndexOf("/") + 1, + fileName.lastIndexOf(".")); + } + + /** + * @param fileName + * @return the directory of the specified file. + */ + public static String path(String fileName) { + String absolutePath = + new File(fileName).getParentFile().getAbsolutePath(); + return absolutePath+slash(absolutePath); + } + + /** + * Check if the chromosome names in the target file are a subset of the + * chromosome name in the alignment file. + * + * @param alignment the alignment file. + * @param target the target file. + * @return true if target chromosomes are a subset of alignment chromosome + * and false otherwise. + */ + public static boolean areChromosomeCompatible(File alignment, File target){ + Scanner aScan = null, tScan = null; + try { + aScan = new Scanner(alignment); + tScan = new Scanner(target); + + ArrayList<String> alist = new ArrayList<String>(); + ArrayList<String> tlist = new ArrayList<String>(); + while(aScan.hasNextLine()){ + ReducedReadLine rl = new ReducedReadLine(aScan.nextLine()); + if(alist.indexOf(rl.chrom())==-1) + alist.add(rl.chrom()); + } + while(tScan.hasNextLine()){ + TargetLine tl = new TargetLine(tScan.nextLine()); + if(tlist.indexOf(tl.chrom())==-1) + tlist.add(tl.chrom()); + } + for(int i = 0; i < tlist.size(); i++){ + if(alist.indexOf(tlist.get(i))!=-1) + return true; + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (ChromosomeFormatException e) { + e.printStackTrace(); + } catch (ChromosomeNotFoundException e) { + e.printStackTrace(); + } catch (RangeFormatException e) { + e.printStackTrace(); + } catch (RangeLimitNotFoundException e) { + e.printStackTrace(); + } catch (NullOrNegativeRangeException e) { + e.printStackTrace(); + } + + + return false; + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/middlewares/ReadCounter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/middlewares/ReadCounter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,33 @@ +package middlewares; +/** + * Counter for the reads on targets (+/- 0/100/200) and the reads overlapping + * targets (+/- 0/100/200). + * + * @author Ali Abdallah + * @version 14.07.2011 + * @since jdk 1.6.0 + */ +public class ReadCounter { + + // Self explanatory. + private int on, on100, on200, over, over100, over200; + + public ReadCounter(){on=0; on100=0; on200=0; over=0; over100=0; over200=0;} + + public void incOn(){on++;} + public void incOn100(){on100++;} + public void incOn200(){on200++;} + + public void incOver(){over++;} + public void incOver100(){over100++;} + public void incOver200(){over200++;} + + public int on(){return on;} + public int on100(){return on100;} + public int on200(){return on200;} + + public int over(){return over;} + public int over100(){return over100;} + public int over200(){return over200;} + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/middlewares/XMLSummaryFileBuilder.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/middlewares/XMLSummaryFileBuilder.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,136 @@ +package middlewares; + +import java.util.*; +import java.io.*; +import org.jdom.*; +import org.jdom.input.*; +import org.jdom.output.*; + +/** + * Used to construct the summary file based on the computation of an + * EnrichmentStatsComputer object. It uses a file pattern to generate this file + * dynamically. + * + * @author Ali Abdallah + * @version 20.07.2011 + * @since Java 1.6 + */ + +public class XMLSummaryFileBuilder { + + /** + * The pattern file containing the structure of the summary without real + * data. + */ + static String xmlPatternFile; + + /** + * The summary file containing the computed data. + */ + static String xmlOutputFile; + + /** + * An object with an abstract representation on an xml-file. + */ + static Document doc; + + /** + * The leaf-tags containing data as text. + */ + List<Element> leafs; + + /** + * The name of the current sample. + */ + static String currSample; + + /** + * Creates and initializes a XMLSummaryFileBuilder object. + * + * @param xmlPatternFile the pattern file. + * @param xmlOutputFile the output file. + * @param currSample the current read alignment sample name without + * the extension. + */ + public XMLSummaryFileBuilder(String xmlPatternFile, String xmlOutputFile, + String currSample) { + + leafs = new ArrayList<Element>(); + XMLSummaryFileBuilder.xmlPatternFile = xmlPatternFile; + XMLSummaryFileBuilder.xmlOutputFile = xmlOutputFile; + XMLSummaryFileBuilder.currSample = currSample; + SAXBuilder builder = new SAXBuilder(); + try { + doc = builder.build(xmlPatternFile); + } catch (JDOMException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + /** + * Same as the constructor above but the pattern file is internally + * specified. + * + * @param xmlOutputFile the output file. + * @param currSample the current read alignment sample name without + * the extension. + */ + public XMLSummaryFileBuilder(String xmlOutputFile, + String currSample) { + this(Misc.binDir()+"/xmlFilePattern.xml", xmlOutputFile, currSample); + } + + /** + * Computes all the leafs of the subtree with root e. + * + * @param e an Element. + * @return all the leafs of the subtree with root e. + */ + public Element[] getLeafs(Element e){ + @SuppressWarnings("unchecked") + List<Element> children = e.getChildren(); + for(int i = 0; i < children.size(); i++){ + Element child = children.get(i); + if(child.getChildren().size() == 0) + leafs.add(child); + else + getLeafs(child); + } + + Object[] oleafs = leafs.toArray(); + Element[] eleafs = new Element[oleafs.length]; + for(int i = 0; i < eleafs.length; i++) + eleafs[i] = (Element)oleafs[i]; + + return eleafs; + } + + /** + * Same as the above method but the element is internally specified as the + * root of the document. + * + * @return an array with all leaf elements of the document. + */ + public Element[] getLeafs(){ + return getLeafs(doc.getRootElement()); + } + + /** + * Write the summary file created. + * @param name the name of the file. + */ + public void writeXMLFile(String name) { + XMLOutputter outp = new XMLOutputter(); + outp.setFormat(Format.getPrettyFormat()); + try { + outp.output(doc, new FileOutputStream(name)); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Attribute.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Attribute.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,717 @@\n+/*--\n+\n+ $Id: Attribute.java,v 1.56 2007/11/10 05:28:58 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+import java.io.*;\n+\n+/**\n+ * An XML attribute. Methods allow the user to obtain the value of the attribute\n+ * as well as namespace and type information.\n+ *\n+ * @version $Revision: 1.56 $, $Date: 2007/11/10 05:28:58 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Elliotte Rusty Harold\n+ * @author Wesley Biggs\n+ * @author Victor Toni\n+ */\n+public class Attribute implements Serializable, Cloneable {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: Attribute.java,v $ $Revision: 1.56 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * Attribute type: the attribute has not been declared or type\n+ * is unknown.\n+ *\n+ * @see #getAttributeType\n+ */\n+ public final static int UNDECLARED_TYPE = 0;\n+\n+ /**\n+ * Attribute type: the attribute value is a string.\n+ *\n+ * @see #getAttributeType\n+ */\n+ public final static int CDATA_TYPE = 1;\n+\n+ /**\n+ * Attribute type: the attribute value is a unique identifier.\n+ *\n+ * @see #getAttributeType\n+ */\n+ public final static int ID_TYPE = 2;\n+\n+ /**\n+ * Attribute type: the attribute value is a reference to a\n+ * unique identifier.\n+ *\n+ * @see #getAttributeType\n+ */\n+ public final static int IDREF_TYPE = 3;\n+\n+ /**\n+ * Attribute type: the attribu'..b'sionException when conversion fails.\n+ */\n+ public long getLongValue() throws DataConversionException {\n+ try {\n+ return Long.parseLong(value.trim());\n+ } catch (final NumberFormatException e) {\n+ throw new DataConversionException(name, "long");\n+ }\n+ }\n+\n+ /**\n+ * This gets the value of the attribute, in\n+ * <code>float</code> form, and if no conversion\n+ * can occur, throws a\n+ * <code>{@link DataConversionException}</code>\n+ *\n+ * @return <code>float</code> value of attribute.\n+ * @throws DataConversionException when conversion fails.\n+ */\n+ public float getFloatValue() throws DataConversionException {\n+ try {\n+ // Avoid Float.parseFloat() to support JDK 1.1\n+ return Float.valueOf(value.trim()).floatValue();\n+ } catch (final NumberFormatException e) {\n+ throw new DataConversionException(name, "float");\n+ }\n+ }\n+\n+ /**\n+ * This gets the value of the attribute, in\n+ * <code>double</code> form, and if no conversion\n+ * can occur, throws a\n+ * <code>{@link DataConversionException}</code>\n+ *\n+ * @return <code>double</code> value of attribute.\n+ * @throws DataConversionException when conversion fails.\n+ */\n+ public double getDoubleValue() throws DataConversionException {\n+ try {\n+ // Avoid Double.parseDouble() to support JDK 1.1\n+ return Double.valueOf(value.trim()).doubleValue();\n+ } catch (final NumberFormatException e) {\n+ // Specially handle INF and -INF that Double.valueOf doesn\'t do\n+ String v = value.trim();\n+ if ("INF".equals(v)) {\n+ return Double.POSITIVE_INFINITY;\n+ }\n+ if ("-INF".equals(v)) {\n+ return Double.NEGATIVE_INFINITY;\n+ }\n+ throw new DataConversionException(name, "double");\n+ }\n+ }\n+\n+ /**\n+ * This gets the effective boolean value of the attribute, or throws a\n+ * <code>{@link DataConversionException}</code> if a conversion can\'t be\n+ * performed. True values are: "true", "on", "1", and "yes". False\n+ * values are: "false", "off", "0", and "no". Values are trimmed before\n+ * comparison. Values other than those listed here throw the exception.\n+ *\n+ * @return <code>boolean</code> value of attribute.\n+ * @throws DataConversionException when conversion fails.\n+ */\n+ public boolean getBooleanValue() throws DataConversionException {\n+ final String valueTrim = value.trim();\n+ if (\n+ (valueTrim.equalsIgnoreCase("true")) ||\n+ (valueTrim.equalsIgnoreCase("on")) ||\n+ (valueTrim.equalsIgnoreCase("1")) ||\n+ (valueTrim.equalsIgnoreCase("yes"))) {\n+ return true;\n+ } else if (\n+ (valueTrim.equalsIgnoreCase("false")) ||\n+ (valueTrim.equalsIgnoreCase("off")) ||\n+ (valueTrim.equalsIgnoreCase("0")) ||\n+ (valueTrim.equalsIgnoreCase("no"))\n+ ) {\n+ return false;\n+ } else {\n+ throw new DataConversionException(name, "boolean");\n+ }\n+ }\n+\n+ // Support a custom Namespace serialization so no two namespace\n+ // object instances may exist for the same prefix/uri pair\n+ private void writeObject(final ObjectOutputStream out) throws IOException {\n+\n+ out.defaultWriteObject();\n+\n+ // We use writeObject() and not writeUTF() to minimize space\n+ // This allows for writing pointers to already written strings\n+ out.writeObject(namespace.getPrefix());\n+ out.writeObject(namespace.getURI());\n+ }\n+\n+ private void readObject(final ObjectInputStream in)\n+ throws IOException, ClassNotFoundException {\n+\n+ in.defaultReadObject();\n+\n+ namespace = Namespace.getNamespace(\n+ (String) in.readObject(), (String) in.readObject());\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/AttributeList.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/AttributeList.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,518 @@\n+/*--\n+\n+ $Id: AttributeList.java,v 1.24 2007/11/10 05:28:58 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+import java.util.*;\n+\n+/**\n+ * <code>AttributeList</code> represents legal JDOM <code>Attribute</code>\n+ * content. This class is NOT PUBLIC; users should see it as a simple List\n+ * implementation.\n+ *\n+ * @author Alex Rosen\n+ * @author Philippe Riand\n+ * @author Bradley S. Huffman\n+ * @version $Revision: 1.24 $, $Date: 2007/11/10 05:28:58 $\n+ * @see CDATA\n+ * @see Comment\n+ * @see Element\n+ * @see EntityRef\n+ * @see ProcessingInstruction\n+ * @see Text\n+ */\n+class AttributeList extends AbstractList\n+ implements List, java.io.Serializable {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: AttributeList.java,v $ $Revision: 1.24 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $";\n+\n+ private static final int INITIAL_ARRAY_SIZE = 5;\n+\n+ /** The backing list */\n+ private Attribute elementData[];\n+ private int size;\n+\n+ /** The parent Element */\n+ private Element parent;\n+\n+ /** Force an Element parent */\n+ private AttributeList() {}\n+\n+ /**\n+ * Create a new instance of the AttributeList representing\n+ * Element content\n+ *\n+ * @param parent element whose attributes are to be held\n+ */\n+ AttributeList(Element parent) {\n+ this.parent = parent;\n+ }\n+\n+ /**\n+ * Package internal method to support building from sources that are\n+ '..b'x: " + index +\n+ " Size: " + size());\n+\n+ Attribute old = elementData[index];\n+ old.setParent(null);\n+ int numMoved = size - index - 1;\n+ if (numMoved > 0)\n+ System.arraycopy(elementData, index+1, elementData, index,numMoved);\n+ elementData[--size] = null; // Let gc do its work\n+ modCount++;\n+ return old;\n+ }\n+\n+ /**\n+ * Remove the <code>Attribute</code> with the\n+ * given name and <code>Namespace</code>.\n+ *\n+ * @param namespace <code>Namespace</code> to match\n+ * @return the <code>true</code> if attribute was removed,\n+ * <code>false</code> otherwise\n+ */\n+ boolean remove(String name, Namespace namespace) {\n+ int index = indexOf(name, namespace);\n+ if (index < 0) {\n+ return false;\n+ }\n+ remove(index);\n+ return true;\n+ }\n+\n+ /**\n+ * Set the object at the specified location to the supplied\n+ * object.\n+ *\n+ * @param index The location to set the value to.\n+ * @param obj The location to set the value to.\n+ * @return The object which was replaced.\n+ * throws IndexOutOfBoundsException if index < 0 || index >= size()\n+ */\n+ public Object set(int index, Object obj) {\n+ if (obj instanceof Attribute) {\n+ Attribute attribute = (Attribute) obj;\n+ int duplicate = indexOfDuplicate(attribute);\n+ if ((duplicate >= 0) && (duplicate != index)) {\n+ throw new IllegalAddException("Cannot set duplicate attribute");\n+ }\n+ return set(index, attribute);\n+ }\n+ else if (obj == null) {\n+ throw new IllegalAddException("Cannot add null attribute");\n+ }\n+ else {\n+ throw new IllegalAddException("Class " +\n+ obj.getClass().getName() +\n+ " is not an attribute");\n+ }\n+ }\n+\n+ /**\n+ * Set the object at the specified location to the supplied\n+ * object. Note: does not check for duplicate attributes.\n+ *\n+ * @param index The location to set the value to.\n+ * @param attribute The attribute to set.\n+ * @return The object which was replaced.\n+ * throws IndexOutOfBoundsException if index < 0 || index >= size()\n+ */\n+ Object set(int index, Attribute attribute) {\n+ if (index < 0 || index >= size)\n+ throw new IndexOutOfBoundsException("Index: " + index +\n+ " Size: " + size());\n+\n+ if (attribute.getParent() != null) {\n+ throw new IllegalAddException(\n+ "The attribute already has an existing parent \\"" +\n+ attribute.getParent().getQualifiedName() + "\\"");\n+ }\n+\n+ String reason = Verifier.checkNamespaceCollision(attribute, parent);\n+ if (reason != null) {\n+ throw new IllegalAddException(parent, attribute, reason);\n+ }\n+\n+ Attribute old = (Attribute) elementData[index];\n+ old.setParent(null);\n+\n+ elementData[index] = attribute;\n+ attribute.setParent(parent);\n+ return old;\n+ }\n+\n+ /**\n+ * Return index of attribute with same name and Namespace, or\n+ * -1 if one doesn\'t exist\n+ */\n+ private int indexOfDuplicate(Attribute attribute) {\n+ int duplicate = -1;\n+ String name = attribute.getName();\n+ Namespace namespace = attribute.getNamespace();\n+ duplicate = indexOf(name, namespace);\n+ return duplicate;\n+ }\n+\n+ /**\n+ * Return the number of items in this list\n+ *\n+ * @return The number of items in this list.\n+ */\n+ public int size() {\n+ return size;\n+ }\n+\n+ /**\n+ * Return this list as a <code>String</code>\n+ */\n+ public String toString() {\n+ return super.toString();\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/CDATA.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/CDATA.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,205 @@\n+/*--\n+\n+ $Id: CDATA.java,v 1.32 2007/11/10 05:28:58 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+/**\n+ * An XML CDATA section. Represents character-based content within an XML\n+ * document that should be output within special CDATA tags. Semantically it\'s\n+ * identical to a simple {@link Text} object, but output behavior is different.\n+ * CDATA makes no guarantees about the underlying textual representation of\n+ * character data, but does expose that data as a Java String.\n+ *\n+ * @version $Revision: 1.32 $, $Date: 2007/11/10 05:28:58 $\n+ * @author Dan Schaffer\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Bradley S. Huffman\n+ * @author Victor Toni\n+ */\n+public class CDATA extends Text {\n+\n+ private static final String CVS_ID = \n+ "@(#) $RCSfile: CDATA.java,v $ $Revision: 1.32 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * This is the protected, no-args constructor standard in all JDOM\n+ * classes. It allows subclassers to get a raw instance with no\n+ * initialization.\n+ */\n+ protected CDATA() { }\n+\n+ /**\n+ * This constructor creates a new <code>CDATA</code> node, with the\n+ * supplied string value as it\'s character content.\n+ *\n+ * @param string the node\'s character content.\n+ * @throws IllegalDataException if <code>str</code> contains an \n+ * illegal character such as a vertical tab (as determined\n+ * by {@'..b'limiter <code>]]></code>.\n+ */\n+ public CDATA(final String string) {\n+ setText(string);\n+ }\n+\n+ /**\n+ * This will set the value of this <code>CDATA</code> node.\n+ *\n+ * @param str value for node\'s content.\n+ * @return the object on which the method was invoked\n+ * @throws IllegalDataException if <code>str</code> contains an \n+ * illegal character such as a vertical tab (as determined\n+ * by {@link org.jdom.Verifier#checkCharacterData})\n+ * or the CDATA end delimiter <code>]]></code>.\n+ */\n+ public Text setText(final String str) {\n+ // Overrides Text.setText() because this needs to check that CDATA rules\n+ // are enforced. We could have a separate Verifier check for CDATA\n+ // beyond Text and call that alone before super.setText().\n+\n+ if (str == null || "".equals(str)) {\n+ value = EMPTY_STRING;\n+ return this;\n+ }\n+\n+ final String reason = Verifier.checkCDATASection(str);\n+ if (reason != null) {\n+ throw new IllegalDataException(str, "CDATA section", reason);\n+ }\n+\n+ value = str;\n+\n+ return this;\n+ }\n+\n+ /**\n+ * This will append character content to whatever content already\n+ * exists within this <code>CDATA</code> node.\n+ *\n+ * @param str character content to append.\n+ * @throws IllegalDataException if <code>str</code> contains an \n+ * illegal character such as a vertical tab (as determined\n+ * by {@link org.jdom.Verifier#checkCharacterData})\n+ * or the CDATA end delimiter <code>]]></code>.\n+ */\n+ public void append(final String str) {\n+ // Overrides Text.append(String) because this needs to check that CDATA\n+ // rules are enforced. We could have a separate Verifier check for CDATA\n+ // beyond Text and call that alone before super.setText().\n+ \n+ if (str == null || "".equals(str)) {\n+ return;\n+ }\n+ \n+ // we need a temp value to ensure that the value is changed _after_\n+ // validation\n+ final String tmpValue;\n+ if (value == EMPTY_STRING) {\n+ tmpValue = str;\n+ } else {\n+ tmpValue = value + str;\n+ }\n+ \n+ // we have to do late checking since the end of a CDATA section could \n+ // have been created by concating both strings:\n+ // "]" + "]>" \n+ // or \n+ // "]]" + ">"\n+ // TODO: maybe this could be optimized for this two cases\n+ final String reason = Verifier.checkCDATASection(tmpValue);\n+ if (reason != null) {\n+ throw new IllegalDataException(str, "CDATA section", reason);\n+ }\n+ \n+ value = tmpValue;\n+ }\n+ \n+ /**\n+ * This will append the content of another <code>Text</code> node\n+ * to this node.\n+ *\n+ * @param text Text node to append.\n+ */\n+ public void append(final Text text) {\n+ // Overrides Text.append(Text) because this needs to check that CDATA\n+ // rules are enforced. We could have a separate Verifier check for CDATA\n+ // beyond Text and call that alone before super.setText().\n+ \n+ if (text == null) {\n+ return;\n+ }\n+ append(text.getText());\n+ }\n+\n+ /**\n+ * This returns a <code>String</code> representation of the\n+ * <code>CDATA</code> node, suitable for debugging. If the XML\n+ * representation of the <code>CDATA</code> node is desired,\n+ * either <code>{@link #getText}</code> or\n+ * {@link org.jdom.output.XMLOutputter#output(CDATA, java.io.Writer)}</code>\n+ * should be used.\n+ *\n+ * @return <code>String</code> - information about this node.\n+ */\n+ public String toString() {\n+ return new StringBuffer(64)\n+ .append("[CDATA: ")\n+ .append(getText())\n+ .append("]")\n+ .toString();\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Comment.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Comment.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,145 @@ +/*-- + + $Id: Comment.java,v 1.33 2007/11/10 05:28:58 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +/** + * An XML comment. Methods allow the user to get and set the text of the + * comment. + * + * @version $Revision: 1.33 $, $Date: 2007/11/10 05:28:58 $ + * @author Brett McLaughlin + * @author Jason Hunter + */ +public class Comment extends Content { + + private static final String CVS_ID = + "@(#) $RCSfile: Comment.java,v $ $Revision: 1.33 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $"; + + /** Text of the <code>Comment</code> */ + protected String text; + + /** + * Default, no-args constructor for implementations to use if needed. + */ + protected Comment() {} + + /** + * This creates the comment with the supplied text. + * + * @param text <code>String</code> content of comment. + */ + public Comment(String text) { + setText(text); + } + + + /** + * Returns the XPath 1.0 string value of this element, which is the + * text of this comment. + * + * @return the text of this comment + */ + public String getValue() { + return text; + } + + /** + * This returns the textual data within the <code>Comment</code>. + * + * @return <code>String</code> - text of comment. + */ + public String getText() { + return text; + } + + /** + * This will set the value of the <code>Comment</code>. + * + * @param text <code>String</code> text for comment. + * @return <code>Comment</code> - this Comment modified. + * @throws IllegalDataException if the given text is illegal for a + * Comment. + */ + public Comment setText(String text) { + String reason; + if ((reason = Verifier.checkCommentData(text)) != null) { + throw new IllegalDataException(text, "comment", reason); + } + + this.text = text; + return this; + } + + /** + * This returns a <code>String</code> representation of the + * <code>Comment</code>, suitable for debugging. If the XML + * representation of the <code>Comment</code> is desired, + * {@link org.jdom.output.XMLOutputter#outputString(Comment)} + * should be used. + * + * @return <code>String</code> - information about the + * <code>Attribute</code> + */ + public String toString() { + return new StringBuffer() + .append("[Comment: ") + .append(new org.jdom.output.XMLOutputter().outputString(this)) + .append("]") + .toString(); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Content.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Content.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,192 @@ +/*-- + + $Id: Content.java,v 1.6 2007/11/10 05:28:58 jhunter Exp $ + + Copyright (C) 2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +import java.io.*; + +/** + * Superclass for JDOM objects which can be legal child content + * of {@link org.jdom.Parent} nodes. + * + * @see org.jdom.Comment + * @see org.jdom.DocType + * @see org.jdom.Element + * @see org.jdom.EntityRef + * @see org.jdom.Parent + * @see org.jdom.ProcessingInstruction + * @see org.jdom.Text + * + * @author Bradley S. Huffman + * @author Jason Hunter + * @version $Revision: 1.6 $, $Date: 2007/11/10 05:28:58 $ + */ +public abstract class Content implements Cloneable, Serializable { + + protected Parent parent = null; + + protected Content() {} + + /** + * Detaches this child from its parent or does nothing if the child + * has no parent. + * + * @return this child detached + */ + public Content detach() { + if (parent != null) { + parent.removeContent(this); + } + return this; + } + + /** + * Return this child's parent, or null if this child is currently + * not attached. The parent can be either an {@link Element} + * or a {@link Document}. + * + * @return this child's parent or null if none + */ + public Parent getParent() { + return parent; + } + + /** + * A convenience method that returns any parent element for this element, + * or null if the element is unattached or is a root element. This was the + * original behavior of getParent() in JDOM Beta 9 which began returning + * Parent in Beta 10. This method provides a convenient upgrade path for + * JDOM Beta 10 and 1.0 users. + * + * @return the containing Element or null if unattached or a root element + */ + public Element getParentElement() { + Parent parent = getParent(); + return (Element) ((parent instanceof Element) ? parent : null); + } + + /** + * Sets the parent of this Content. The caller is responsible for removing + * any pre-existing parentage. + * + * @param parent new parent element + * @return the target element + */ + protected Content setParent(Parent parent) { + this.parent = parent; + return this; + } + + /** + * Return this child's owning document or null if the branch containing + * this child is currently not attached to a document. + * + * @return this child's owning document or null if none + */ + public Document getDocument() { + if (parent == null) return null; + return parent.getDocument(); + } + + + /** + * Returns the XPath 1.0 string value of this child. + * + * @return xpath string value of this child. + */ + public abstract String getValue(); + + /** + * Returns a deep, unattached copy of this child and its descendants + * detached from any parent or document. + * + * @return a detached deep copy of this child and descendants + */ + public Object clone() { + try { + Content c = (Content)super.clone(); + c.parent = null; + return c; + } catch (CloneNotSupportedException e) { + //Can not happen .... + //e.printStackTrace(); + return null; + } + } + + /** + * This tests for equality of this Content object to the supplied object. + * Content items are considered equal only if they are referentially equal + * (i.e. the same object). User code may choose to compare objects + * based on their properties instead. + * + * @param ob <code>Object</code> to compare to. + * @return <code>boolean</code> - whether the <code>Content</code> is + * equal to the supplied <code>Object</code>. + */ + public final boolean equals(Object ob) { + return (ob == this); + } + + /** + * This returns the hash code for this <code>Content</code> item. + * + * @return <code>int</code> - hash code. + */ + public final int hashCode() { + return super.hashCode(); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/ContentList.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/ContentList.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,944 @@\n+/*--\n+\n+ $Id: ContentList.java,v 1.42 2007/11/10 05:28:58 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org).\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+import java.util.*;\n+\n+import org.jdom.filter.*;\n+\n+/**\n+ * A non-public list implementation holding only legal JDOM content, including\n+ * content for Document or Element nodes. Users see this class as a simple List\n+ * implementation.\n+ *\n+ * @see CDATA\n+ * @see Comment\n+ * @see Element\n+ * @see EntityRef\n+ * @see ProcessingInstruction\n+ * @see Text\n+ *\n+ * @version $Revision: 1.42 $, $Date: 2007/11/10 05:28:58 $\n+ * @author Alex Rosen\n+ * @author Philippe Riand\n+ * @author Bradley S. Huffman\n+ */\n+final class ContentList extends AbstractList implements java.io.Serializable {\n+\n+\tprivate static final String CVS_ID =\n+ "@(#) $RCSfile: ContentList.java,v $ $Revision: 1.42 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $";\n+\n+\tprivate static final long serialVersionUID = 1L;\n+\n+\tprivate static final int INITIAL_ARRAY_SIZE = 5;\n+\n+ /** Our backing list */\n+ private Content elementData[];\n+ private int size;\n+\n+ /** Document or Element this list belongs to */\n+ private Parent parent;\n+\n+ /** Force either a Document or Element parent */\n+ ContentList(Parent parent) {\n+ this.parent = parent;\n+ }\n+\n+ /**\n+ * Package internal method to support building from sources that are\n+ * 100% trusted.\n+ *\n+ * @param c content to add without any checks\n+ */\n'..b'ow new NoSuchElementException("previous() is before the start of the Iterator");\n+\t\t\tindex = previousIndex();\n+\t\t\tcursor = tmpcursor;\n+\t\t\tforward = false;\n+\t\t\tcanremove = true;\n+\t\t\tcanset = true;\n+\t\t\treturn ContentList.this.get(cursor);\n+\t\t}\n+\n+ /**\n+\t\t * Returns the index of the element that would be returned by a\n+\t\t * subsequent call to <code>next</code>.\n+\t\t */\n+ public int nextIndex() {\n+ checkConcurrentModification();\n+ \tif (forward) {\n+ \t\t// Starting with next possibility ....\n+ \t\tfor (int i = cursor + 1; i < ContentList.this.size(); i++) {\n+ \t\t\tif (filter.matches(ContentList.this.get(i))) {\n+ \t\t\t\ttmpcursor = i;\n+ \t\t\t\treturn index + 1;\n+ \t\t\t}\n+ \t\t}\n+ \t\t\t// Never found another match.... put the insertion point at\n+ \t\t\t// the end of the list....\n+ \t\t\ttmpcursor = ContentList.this.size();\n+ \t\t\treturn index + 1;\n+ \t\t}\n+\n+ \t\t// We\'ve been going back... so nextIndex() returns the same\n+\t\t\t// element.\n+ \t\ttmpcursor = cursor;\n+ \t\treturn index;\n+ }\n+\n+ /**\n+ * Returns the index of the element that would be returned by a\n+ * subsequent call to <code>previous</code>. (Returns -1 if the\n+ * list iterator is at the beginning of the list.)\n+ */\n+ public int previousIndex() {\n+\t\t\tcheckConcurrentModification();\n+\t\t\tif (!forward) {\n+\t\t\t\t// starting with next possibility ....\n+\t\t\t\tfor (int i = cursor - 1; i >= 0; i--) {\n+\t\t\t\t\tif (filter.matches(ContentList.this.get(i))) {\n+\t\t\t\t\t\ttmpcursor = i;\n+\t\t\t\t\t\treturn index - 1;\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t\t// Never found another match.... put the insertion point at\n+\t\t\t\t// the start of the list....\n+\t\t\t\ttmpcursor = -1;\n+\t\t\t\treturn index - 1;\n+\t\t\t}\n+\n+\t\t\t// We\'ve been going forwards... so previousIndex() returns same\n+\t\t\t// element.\n+\t\t\ttmpcursor = cursor;\n+\t\t\treturn index;\n+\t\t}\n+\n+ /**\n+\t\t * Inserts the specified element into the list.\n+\t\t */\n+ public void add(Object obj) {\n+\t\t\t// Call to nextIndex() will check concurrent.\n+\t\t\tnextIndex();\n+\t\t\t// tmpcursor is the backing cursor of the next element\n+\t\t\t// Remember that List.add(index,obj) is really an insert....\n+\t\t\tContentList.this.add(tmpcursor, obj);\n+\t\t\tforward = true;\n+\t\t\texpected = ContentList.this.getModCount();\n+\t\t\tcanremove = canset = false;\n+\t\t\tindex = nextIndex();\n+\t\t\tcursor = tmpcursor;\n+\t\t\tfsize++;\n+\t\t}\n+\n+ /**\n+\t\t * Removes from the list the last element that was returned by\n+\t\t * the last call to <code>next</code> or <code>previous</code>.\n+\t\t */\n+ public void remove() {\n+\t\t\tif (!canremove)\n+\t\t\t\tthrow new IllegalStateException("Can not remove an "\n+\t\t\t\t\t\t+ "element unless either next() or previous() has been called "\n+\t\t\t\t\t\t+ "since the last remove()");\n+\t\t\tnextIndex(); // to get out cursor ...\n+\t\t\tContentList.this.remove(cursor);\n+\t\t\tcursor = tmpcursor - 1;\n+\t\t\texpected = ContentList.this.getModCount();\n+\n+\t\t\tforward = false;\n+\t\t\tcanremove = false;\n+\t\t\tcanset = false;\n+\t\t\tfsize--;\n+\t\t}\n+\n+ /**\n+\t\t * Replaces the last element returned by <code>next</code> or\n+\t\t * <code>previous</code> with the specified element.\n+\t\t */\n+ public void set(Object obj) {\n+\t\t\tif (!canset)\n+\t\t\t\tthrow new IllegalStateException("Can not set an element "\n+\t\t\t\t\t\t+ "unless either next() or previous() has been called since the " \n+\t\t\t\t\t\t+ "last remove() or set()");\n+\t\t\tcheckConcurrentModification();\n+\n+\t\t\tif (!filter.matches(obj)) {\n+\t\t\t\tthrow new IllegalAddException("Filter won\'t allow index " + index + " to be set to "\n+\t\t\t\t\t\t+ (obj.getClass()).getName());\n+\t\t\t}\n+\t\t\t\n+\t\t\tContentList.this.set(cursor, obj);\n+\t\t\texpected = ContentList.this.getModCount();\n+\t\t\t\n+\t\t}\n+\n+ /**\n+ * Check if are backing list is being modified by someone else.\n+ */\n+ private void checkConcurrentModification() {\n+ if (expected != ContentList.this.getModCount()) {\n+ throw new ConcurrentModificationException();\n+ }\n+ }\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/DataConversionException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/DataConversionException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,87 @@ +/*-- + + $Id: DataConversionException.java,v 1.14 2007/11/10 05:28:58 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +/** + * Thrown when a data conversion from a string to value type fails, such as + * can happen with the {@link Attribute} convenience getter functions. + * + * @version $Revision: 1.14 $, $Date: 2007/11/10 05:28:58 $ + * @author Brett McLaughlin + * @author Jason Hunter + */ +public class DataConversionException extends JDOMException { + + private static final String CVS_ID = + "@(#) $RCSfile: DataConversionException.java,v $ $Revision: 1.14 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $"; + + /** + * Constructs an exception where the named construct couldn't be converted + * to the named data type. + * + * @param name name of the construct whose value failed conversion + * @param dataType type the conversion was attempting to create + */ + public DataConversionException(String name, String dataType) { + super(new StringBuffer() + .append("The XML construct ") + .append(name) + .append(" could not be converted to a ") + .append(dataType) + .toString()); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/DefaultJDOMFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/DefaultJDOMFactory.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,191 @@ +/*-- + + $Id: DefaultJDOMFactory.java,v 1.7 2007/11/10 05:28:58 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +import java.util.*; + +/** + * Creates the standard top-level JDOM classes (Element, Document, Comment, + * etc). A subclass of this factory might construct custom classes. + * + * @version $Revision: 1.7 $, $Date: 2007/11/10 05:28:58 $ + * @author Ken Rune Holland + * @author Phil Nelson + * @author Bradley S. Huffman + */ +public class DefaultJDOMFactory implements JDOMFactory { + + private static final String CVS_ID = + "@(#) $RCSfile: DefaultJDOMFactory.java,v $ $Revision: 1.7 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $"; + + public DefaultJDOMFactory() { } + + // Allow Javadocs to inherit from JDOMFactory + + public Attribute attribute(String name, String value, Namespace namespace) { + return new Attribute(name, value, namespace); + } + + public Attribute attribute(String name, String value, + int type, Namespace namespace) { + return new Attribute(name, value, type, namespace); + } + + public Attribute attribute(String name, String value) { + return new Attribute(name, value); + } + + public Attribute attribute(String name, String value, int type) { + return new Attribute(name, value, type); + } + + public CDATA cdata(String text) { + return new CDATA(text); + } + + public Text text(String text) { + return new Text(text); + } + + public Comment comment(String text) { + return new Comment(text); + } + + public DocType docType(String elementName, + String publicID, String systemID) { + return new DocType(elementName, publicID, systemID); + } + + public DocType docType(String elementName, String systemID) { + return new DocType(elementName, systemID); + } + + public DocType docType(String elementName) { + return new DocType(elementName); + } + + public Document document(Element rootElement, DocType docType) { + return new Document(rootElement, docType); + } + + public Document document(Element rootElement, DocType docType, String baseURI) { + return new Document(rootElement, docType, baseURI); + } + + public Document document(Element rootElement) { + return new Document(rootElement); + } + + public Element element(String name, Namespace namespace) { + return new Element(name, namespace); + } + + public Element element(String name) { + return new Element(name); + } + + public Element element(String name, String uri) { + return new Element(name, uri); + } + + public Element element(String name, String prefix, String uri) { + return new Element(name, prefix, uri); + } + + public ProcessingInstruction processingInstruction(String target, + Map data) { + return new ProcessingInstruction(target, data); + } + + public ProcessingInstruction processingInstruction(String target, + String data) { + return new ProcessingInstruction(target, data); + } + + public EntityRef entityRef(String name) { + return new EntityRef(name); + } + + public EntityRef entityRef(String name, String publicID, String systemID) { + return new EntityRef(name, publicID, systemID); + } + + public EntityRef entityRef(String name, String systemID) { + return new EntityRef(name, systemID); + } + + // ===================================================================== + // List manipulation + // ===================================================================== + + public void addContent(Parent parent, Content child) { + if (parent instanceof Document) { + ((Document) parent).addContent(child); + } + else { + ((Element) parent).addContent(child); + } + } + + public void setAttribute(Element parent, Attribute a) { + parent.setAttribute(a); + } + + public void addNamespaceDeclaration(Element parent, Namespace additional) { + parent.addNamespaceDeclaration(additional); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/DescendantIterator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/DescendantIterator.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,173 @@ +/*-- + + $Id: DescendantIterator.java,v 1.6 2007/11/10 05:28:58 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +import java.util.*; +import org.jdom.Content; +import org.jdom.Element; +import org.jdom.Parent; + +/** + * Traverse all a parent's descendants (all children at any level below + * the parent). + * + * @author Bradley S. Huffman + * @author Jason Hunter + * @version $Revision: 1.6 $, $Date: 2007/11/10 05:28:58 $ + */ +class DescendantIterator implements Iterator { + + private Iterator iterator; + private Iterator nextIterator; + private List stack = new ArrayList(); + + private static final String CVS_ID = + "@(#) $RCSfile: DescendantIterator.java,v $ $Revision: 1.6 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $"; + + /** + * Iterator for the descendants of the supplied object. + * + * @param parent document or element whose descendants will be iterated + */ + DescendantIterator(Parent parent) { + if (parent == null) { + throw new IllegalArgumentException("parent parameter was null"); + } + this.iterator = parent.getContent().iterator(); + } + + /** + * Returns true> if the iteration has more {@link Content} descendants. + * + * @return true is the iterator has more descendants + */ + public boolean hasNext() { + if (iterator != null && iterator.hasNext()) return true; + if (nextIterator != null && nextIterator.hasNext()) return true; + if (stackHasAnyNext()) return true; + return false; + } + + /** + * Returns the next {@link Content} descendant. + * + * @return the next descendant + */ + public Object next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + // If we need to descend, go for it and record where we are. + // We do the shuffle here on the next next() call so remove() is easy + // to code up. + if (nextIterator != null) { + push(iterator); + iterator = nextIterator; + nextIterator = null; + } + + // If this iterator is finished, try moving up the stack + while (!iterator.hasNext()) { + if (stack.size() > 0) { + iterator = pop(); + } + else { + throw new NoSuchElementException("Somehow we lost our iterator"); + } + } + + Content child = (Content) iterator.next(); + if (child instanceof Element) { + nextIterator = ((Element)child).getContent().iterator(); + } + return child; + } + + /** + * Detaches the last {@link org.jdom.Content} returned by the last call to + * next from it's parent. <b>Note</b>: this <b>does not</b> affect + * iteration and all children, siblings, and any node following the + * removed node (in document order) will be visited. + */ + public void remove() { + iterator.remove(); + } + + private Iterator pop() { + int stackSize = stack.size(); + if (stackSize == 0) { + throw new NoSuchElementException("empty stack"); + } + return (Iterator) stack.remove(stackSize - 1); + } + + private void push(Iterator itr) { + stack.add(itr); + } + + private boolean stackHasAnyNext() { + int size = stack.size(); + for (int i = 0; i < size; i++) { + Iterator itr = (Iterator) stack.get(i); + if (itr.hasNext()) { + return true; + } + } + return false; + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/DocType.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/DocType.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,280 @@\n+/*--\n+\n+ $Id: DocType.java,v 1.32 2007/11/10 05:28:58 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+/**\n+ * An XML DOCTYPE declaration. Method allow the user to get and set the\n+ * root element name, public id, and system id.\n+ *\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @version $Revision: 1.32 $, $Date: 2007/11/10 05:28:58 $\n+ */\n+public class DocType extends Content {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: DocType.java,v $ $Revision: 1.32 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $";\n+\n+ /** The element being constrained */\n+ protected String elementName;\n+\n+ /** The public ID of the DOCTYPE */\n+ protected String publicID;\n+\n+ /** The system ID of the DOCTYPE */\n+ protected String systemID;\n+\n+ /** The internal subset of the DOCTYPE */\n+ protected String internalSubset;\n+\n+ /**\n+ * Default, no-args constructor for implementations to use if needed.\n+ */\n+ protected DocType() {}\n+\n+ /*\n+ * XXX:\n+ * We need to take care of entities and notations here.\n+ */\n+\n+ /**\n+ * This will create the <code>DocType</code> with\n+ * the specified element name and a reference to an\n+ * external DTD.\n+ *\n+ * @param elementName <code>String</code> name of\n+ * element being constrained.\n+ * @param publicID <code>String</code> public ID of\n+ * referenced DTD\n+ * @param systemID <code>String<'..b'ent name for DOCTYPE\n+ */\n+ public String getElementName() {\n+ return elementName;\n+ }\n+\n+ /**\n+ * This will set the root element name declared by this\n+ * DOCTYPE declaration.\n+ *\n+ * @return DocType <code>DocType</code> this DocType object\n+ * @param elementName <code>String</code> name of\n+ * root element being constrained.\n+ * @throws IllegalNameException if the given root element name is not a\n+ * legal XML element name.\n+ */\n+ public DocType setElementName(String elementName) {\n+ // This can contain a colon so we use checkXMLName()\n+ // instead of checkElementName()\n+ String reason = Verifier.checkXMLName(elementName);\n+ if (reason != null) {\n+ throw new IllegalNameException(elementName, "DocType", reason);\n+ }\n+ this.elementName = elementName;\n+ return this;\n+ }\n+\n+ /**\n+ * This will retrieve the public ID of an externally\n+ * referenced DTD, or an empty <code>String</code> if\n+ * none is referenced.\n+ *\n+ * @return <code>String</code> - public ID of referenced DTD.\n+ */\n+ public String getPublicID() {\n+ return publicID;\n+ }\n+\n+ /**\n+ * This will set the public ID of an externally\n+ * referenced DTD.\n+ *\n+ * @param publicID id to set\n+ * @return DocType <code>DocType</code> this DocType object\n+ * @throws IllegalDataException if the given public ID is not a legal\n+ * public ID.\n+ */\n+ public DocType setPublicID(String publicID) {\n+ String reason = Verifier.checkPublicID(publicID);\n+ if (reason != null) {\n+ throw new IllegalDataException(publicID, "DocType", reason);\n+ }\n+ this.publicID = publicID;\n+\n+ return this;\n+ }\n+\n+ /**\n+ * This will retrieve the system ID of an externally\n+ * referenced DTD, or an empty <code>String</code> if\n+ * none is referenced.\n+ *\n+ * @return <code>String</code> - system ID of referenced DTD.\n+ */\n+ public String getSystemID() {\n+ return systemID;\n+ }\n+\n+ /**\n+ * This will set the system ID of an externally\n+ * referenced DTD.\n+ *\n+ * @param systemID id to set\n+ * @return systemID <code>String</code> system ID of\n+ * referenced DTD.\n+ * @throws IllegalDataException if the given system ID is not a legal\n+ * system literal.\n+ */\n+ public DocType setSystemID(String systemID) {\n+ String reason = Verifier.checkSystemLiteral(systemID);\n+ if (reason != null) {\n+ throw new IllegalDataException(systemID, "DocType", reason);\n+ }\n+ this.systemID = systemID;\n+\n+ return this;\n+ }\n+\n+ /**\n+ * Returns the empty string since doctypes don\'t have an XPath\n+ * 1.0 string value.\n+ * @return the empty string\n+ */\n+ public String getValue() {\n+ return ""; // doctypes don\'t have an XPath string value\n+ }\n+\n+ /**\n+ * This sets the data for the internal subset.\n+ *\n+ * @param newData data for the internal subset, as a\n+ * <code>String</code>.\n+ */\n+ public void setInternalSubset(String newData) {\n+ internalSubset = newData;\n+ }\n+\n+ /**\n+ * This returns the data for the internal subset.\n+ *\n+ * @return <code>String</code> - the internal subset\n+ */\n+ public String getInternalSubset() {\n+ return internalSubset;\n+ }\n+\n+ /**\n+ * This returns a <code>String</code> representation of the\n+ * <code>DocType</code>, suitable for debugging.\n+ *\n+ * @return <code>String</code> - information about the\n+ * <code>DocType</code>\n+ */\n+ public String toString() {\n+ return new StringBuffer()\n+ .append("[DocType: ")\n+ .append(new org.jdom.output.XMLOutputter().outputString(this))\n+ .append("]")\n+ .toString();\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Document.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Document.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,767 @@\n+/*--\n+\n+ $Id: Document.java,v 1.85 2007/11/10 05:28:58 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+import java.util.*;\n+import org.jdom.filter.*;\n+\n+/**\n+ * An XML document. Methods allow access to the root element as well as the\n+ * {@link DocType} and other document-level information.\n+ *\n+ * @version $Revision: 1.85 $, $Date: 2007/11/10 05:28:58 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Jools Enticknap\n+ * @author Bradley S. Huffman\n+ */\n+public class Document implements Parent {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: Document.java,v $ $Revision: 1.85 $ $Date: 2007/11/10 05:28:58 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * This document\'s content including comments, PIs, a possible\n+ * DocType, and a root element.\n+ * Subclassers have to track content using their own\n+ * mechanism.\n+ */\n+ ContentList content = new ContentList(this);\n+\n+ /**\n+ * See http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html#baseURIs-Considerations\n+ */\n+ protected String baseURI = null;\n+\n+ // Supports the setProperty/getProperty calls\n+ private HashMap propertyMap = null;\n+\n+ /**\n+ * Creates a new empty document. A document must have a root element,\n+ * so this document will not be well-formed and accessor methods will\n+ * throw an IllegalStateException if this document is accessed before a\n+ * root element is added. T'..b'pare to\n+ * @return <code>boolean</code> whether the <code>Document</code> is\n+ * equal to the supplied <code>Object</code>\n+ */\n+ public final boolean equals(Object ob) {\n+ return (ob == this);\n+ }\n+\n+ /**\n+ * This returns the hash code for this <code>Document</code>.\n+ *\n+ * @return <code>int</code> hash code\n+ */\n+ public final int hashCode() {\n+ return super.hashCode();\n+ }\n+\n+ /**\n+ * This will return a deep clone of this <code>Document</code>.\n+ *\n+ * @return <code>Object</code> clone of this <code>Document</code>\n+ */\n+ public Object clone() {\n+ Document doc = null;\n+\n+ try {\n+ doc = (Document) super.clone();\n+ } catch (CloneNotSupportedException ce) {\n+ // Can\'t happen\n+ }\n+\n+ // The clone has a reference to this object\'s content list, so\n+ // owerwrite with a empty list\n+ doc.content = new ContentList(doc);\n+\n+ // Add the cloned content to clone\n+\n+ for (int i = 0; i < content.size(); i++) {\n+ Object obj = content.get(i);\n+ if (obj instanceof Element) {\n+ Element element = (Element)((Element)obj).clone();\n+ doc.content.add(element);\n+ }\n+ else if (obj instanceof Comment) {\n+ Comment comment = (Comment)((Comment)obj).clone();\n+ doc.content.add(comment);\n+ }\n+ else if (obj instanceof ProcessingInstruction) {\n+ ProcessingInstruction pi = (ProcessingInstruction)\n+ ((ProcessingInstruction)obj).clone();\n+ doc.content.add(pi);\n+ }\n+ else if (obj instanceof DocType) {\n+ DocType dt = (DocType) ((DocType)obj).clone();\n+ doc.content.add(dt);\n+ }\n+ }\n+\n+ return doc;\n+ }\n+\n+ /**\n+ * Returns an iterator that walks over all descendants in document order.\n+ *\n+ * @return an iterator to walk descendants\n+ */\n+ public Iterator getDescendants() {\n+ return new DescendantIterator(this);\n+ }\n+\n+ /**\n+ * Returns an iterator that walks over all descendants in document order\n+ * applying the Filter to return only elements that match the filter rule.\n+ * With filters you can match only Elements, only Comments, Elements or\n+ * Comments, only Elements with a given name and/or prefix, and so on.\n+ *\n+ * @param filter filter to select which descendants to see\n+ * @return an iterator to walk descendants within a filter\n+ */\n+ public Iterator getDescendants(Filter filter) {\n+ return new FilterIterator(new DescendantIterator(this), filter);\n+ }\n+\n+ public Parent getParent() {\n+ return null; // documents never have parents\n+ }\n+\n+\n+\n+ /**\n+ * @see org.jdom.Parent#getDocument()\n+ */\n+ public Document getDocument() {\n+ return this;\n+ }\n+\n+ /**\n+ * Assigns an arbitrary object to be associated with this document under\n+ * the given "id" string. Null values are permitted. Strings beginning\n+ * with "http://www.jdom.org/ are reserved for JDOM use.\n+ *\n+ * @param id the id of the stored object\n+ * @param value the object to store\n+ */\n+ public void setProperty(String id, Object value) {\n+ if (propertyMap == null) {\n+ propertyMap = new HashMap();\n+ }\n+ propertyMap.put(id, value);\n+ }\n+\n+ /**\n+ * Returns the object associated with this document under the given "id"\n+ * string, or null if there is no binding or if the binding explicitly\n+ * stored a null value.\n+ *\n+ * @param id the id of the stored object to return\n+ * @return the object associated with the given id\n+ */\n+ public Object getProperty(String id) {\n+ if (propertyMap == null) return null;\n+ return propertyMap.get(id);\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Element.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Element.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,1564 @@\n+/*--\n+\n+ $Id: Element.java,v 1.159 2007/11/14 05:02:08 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+import java.io.*;\n+import java.util.*;\n+\n+import org.jdom.filter.*;\n+\n+/**\n+ * An XML element. Methods allow the user to get and manipulate its child\n+ * elements and content, directly access the element\'s textual content,\n+ * manipulate its attributes, and manage namespaces.\n+ *\n+ * @version $Revision: 1.159 $, $Date: 2007/11/14 05:02:08 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Lucas Gonze\n+ * @author Kevin Regan\n+ * @author Dan Schaffer\n+ * @author Yusuf Goolamabbas\n+ * @author Kent C. Johnson\n+ * @author Jools Enticknap\n+ * @author Alex Rosen\n+ * @author Bradley S. Huffman\n+ * @author Victor Toni\n+ */\n+public class Element extends Content implements Parent {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: Element.java,v $ $Revision: 1.159 $ $Date: 2007/11/14 05:02:08 $ $Name: jdom_1_1_1 $";\n+\n+ private static final int INITIAL_ARRAY_SIZE = 5;\n+\n+ /** The local name of the element */\n+ protected String name;\n+\n+ /** The namespace of the element */\n+ protected transient Namespace namespace;\n+\n+ /** Additional namespace declarations to store on this element; useful\n+ * during output */\n+ protected transient List additionalNamespaces;\n+\n+ // See http://lists.denveronline.net/lists/jdom-interest/2000-September/003030.html\n+ // for a possible memo'..b'ren to match\n+ * @param ns <code>Namespace</code> to search within\n+ * @return all matching child elements\n+ */\n+ public List getChildren(final String name, final Namespace ns) {\n+ return content.getView(new ElementFilter(name, ns));\n+ }\n+\n+ /**\n+ * This returns the first child element within this element with the\n+ * given local name and belonging to the given namespace.\n+ * If no elements exist for the specified name and namespace, null is\n+ * returned.\n+ *\n+ * @param name local name of child element to match\n+ * @param ns <code>Namespace</code> to search within\n+ * @return the first matching child element, or null if not found\n+ */\n+ public Element getChild(final String name, final Namespace ns) {\n+ final List elements = content.getView(new ElementFilter(name, ns));\n+ final Iterator iter = elements.iterator();\n+ if (iter.hasNext()) {\n+ return (Element) iter.next();\n+ }\n+ return null;\n+ }\n+\n+ /**\n+ * This returns the first child element within this element with the\n+ * given local name and belonging to no namespace.\n+ * If no elements exist for the specified name and namespace, null is\n+ * returned.\n+ *\n+ * @param name local name of child element to match\n+ * @return the first matching child element, or null if not found\n+ */\n+ public Element getChild(final String name) {\n+ return getChild(name, Namespace.NO_NAMESPACE);\n+ }\n+\n+ /**\n+ * <p>\n+ * This removes the first child element (one level deep) with the\n+ * given local name and belonging to no namespace.\n+ * Returns true if a child was removed.\n+ * </p>\n+ *\n+ * @param name the name of child elements to remove\n+ * @return whether deletion occurred\n+ */\n+ public boolean removeChild(final String name) {\n+ return removeChild(name, Namespace.NO_NAMESPACE);\n+ }\n+\n+ /**\n+ * <p>\n+ * This removes the first child element (one level deep) with the\n+ * given local name and belonging to the given namespace.\n+ * Returns true if a child was removed.\n+ * </p>\n+ *\n+ * @param name the name of child element to remove\n+ * @param ns <code>Namespace</code> to search within\n+ * @return whether deletion occurred\n+ */\n+ public boolean removeChild(final String name, final Namespace ns) {\n+ final Filter filter = new ElementFilter(name, ns);\n+ final List old = content.getView(filter);\n+ final Iterator iter = old.iterator();\n+ if (iter.hasNext()) {\n+ iter.next();\n+ iter.remove();\n+ return true;\n+ }\n+\n+ return false;\n+ }\n+\n+ /**\n+ * <p>\n+ * This removes all child elements (one level deep) with the\n+ * given local name and belonging to no namespace.\n+ * Returns true if any were removed.\n+ * </p>\n+ *\n+ * @param name the name of child elements to remove\n+ * @return whether deletion occurred\n+ */\n+ public boolean removeChildren(final String name) {\n+ return removeChildren(name, Namespace.NO_NAMESPACE);\n+ }\n+\n+ /**\n+ * <p>\n+ * This removes all child elements (one level deep) with the\n+ * given local name and belonging to the given namespace.\n+ * Returns true if any were removed.\n+ * </p>\n+ *\n+ * @param name the name of child elements to remove\n+ * @param ns <code>Namespace</code> to search within\n+ * @return whether deletion occurred\n+ */\n+ public boolean removeChildren(final String name, final Namespace ns) {\n+ boolean deletedSome = false;\n+\n+ final Filter filter = new ElementFilter(name, ns);\n+ final List old = content.getView(filter);\n+ final Iterator iter = old.iterator();\n+ while (iter.hasNext()) {\n+ iter.next();\n+ iter.remove();\n+ deletedSome = true;\n+ }\n+\n+ return deletedSome;\n+ }\n+\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/EntityRef.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/EntityRef.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,239 @@\n+/*--\n+\n+ $Id: EntityRef.java,v 1.22 2007/11/10 05:28:59 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+/**\n+ * An XML entity reference. Methods allow the user to manage its name, public\n+ * id, and system id.\n+ *\n+ * @version $Revision: 1.22 $, $Date: 2007/11/10 05:28:59 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Philip Nelson\n+ */\n+public class EntityRef extends Content {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: EntityRef.java,v $ $Revision: 1.22 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $";\n+\n+ /** The name of the <code>EntityRef</code> */\n+ protected String name;\n+\n+ /** The PublicID of the <code>EntityRef</code> */\n+ protected String publicID;\n+\n+ /** The SystemID of the <code>EntityRef</code> */\n+ protected String systemID;\n+\n+ /**\n+ * Default, no-args constructor for implementations to use if needed.\n+ */\n+ protected EntityRef() {}\n+\n+ /**\n+ * This will create a new <code>EntityRef</code> with the supplied name.\n+ *\n+ * @param name <code>String</code> name of element.\n+ * @throws IllegalNameException if the given name is not a legal\n+ * XML name.\n+ */\n+ public EntityRef(String name) {\n+ this(name, null, null);\n+ }\n+\n+ /**\n+ * This will create a new <code>EntityRef</code>\n+ * with the supplied name and system id.\n+ *\n+ * @param name <code>String</code> name of element'..b'ame of element.\n+ * @param publicID public id of the entity reference being constructed\n+ * @param systemID system id of the entity reference being constructed\n+ * @throws IllegalDataException if the given system ID is not a legal\n+ * system literal or the the given public ID is not a\n+ * legal public ID\n+ * @throws IllegalNameException if the given name is not a legal\n+ * XML name.\n+ */\n+ public EntityRef(String name, String publicID, String systemID) {\n+ setName(name);\n+ setPublicID(publicID);\n+ setSystemID(systemID);\n+ }\n+\n+ /**\n+ * This returns the name of the <code>EntityRef</code>.\n+ *\n+ * @return <code>String</code> - entity name.\n+ */\n+ public String getName() {\n+ return name;\n+ }\n+\n+ /**\n+ * Returns the empty string since entity references don\'t have an XPath\n+ * 1.0 string value.\n+ * @return the empty string\n+ */\n+ public String getValue() {\n+ return ""; // entity references don\'t have XPath string values\n+ }\n+\n+ /**\n+ * This will return the publid ID of this <code>EntityRef</code>.\n+ * If there is no public ID, then this returns <code>null</code>.\n+ *\n+ * @return public ID of this <code>EntityRef</code>\n+ */\n+ public String getPublicID() {\n+ return publicID;\n+ }\n+\n+ /**\n+ * This will return the system ID of this <code>EntityRef</code>.\n+ * If there is no system ID, then this returns <code>null</code>.\n+ *\n+ * @return system ID of this <code>EntityRef</code>\n+ */\n+ public String getSystemID() {\n+ return systemID;\n+ }\n+\n+ /**\n+ * This will set the name of this <code>EntityRef</code>.\n+ *\n+ * @param name new name of the entity\n+ * @return this <code>EntityRef</code> modified.\n+ * @throws IllegalNameException if the given name is not a legal\n+ * XML name.\n+ */\n+ public EntityRef setName(String name) {\n+ // This can contain a colon so we use checkXMLName()\n+ // instead of checkElementName()\n+ String reason = Verifier.checkXMLName(name);\n+ if (reason != null) {\n+ throw new IllegalNameException(name, "EntityRef", reason);\n+ }\n+ this.name = name;\n+ return this;\n+ }\n+\n+ /**\n+ * This will set the public ID of this <code>EntityRef</code>.\n+ *\n+ * @param publicID new public id\n+ * @return this <code>EntityRef</code> modified.\n+ * @throws IllegalDataException if the given public ID is not a legal\n+ * public ID.\n+ */\n+ public EntityRef setPublicID(String publicID) {\n+ String reason = Verifier.checkPublicID(publicID);\n+ if (reason != null) {\n+ throw new IllegalDataException(publicID, "EntityRef", reason);\n+ }\n+ this.publicID = publicID;\n+ return this;\n+ }\n+\n+ /**\n+ * This will set the system ID of this <code>EntityRef</code>.\n+ *\n+ * @param systemID new system id\n+ * @throws IllegalDataException if the given system ID is not a legal\n+ * system literal.\n+ * @return this <code>EntityRef</code> modified.\n+ */\n+ public EntityRef setSystemID(String systemID) {\n+ String reason = Verifier.checkSystemLiteral(systemID);\n+ if (reason != null) {\n+ throw new IllegalDataException(systemID, "EntityRef", reason);\n+ }\n+ this.systemID = systemID;\n+ return this;\n+ }\n+\n+ /**\n+ * This returns a <code>String</code> representation of the\n+ * <code>EntityRef</code>, suitable for debugging.\n+ *\n+ * @return <code>String</code> - information about the\n+ * <code>EntityRef</code>\n+ */\n+ public String toString() {\n+ return new StringBuffer()\n+ .append("[EntityRef: ")\n+ .append("&")\n+ .append(name)\n+ .append(";")\n+ .append("]")\n+ .toString();\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/FilterIterator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/FilterIterator.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,115 @@ +/*-- + + $Id: FilterIterator.java,v 1.6 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +import java.util.*; +import org.jdom.filter.*; + +/** + * Traverse a parent's children that match the supplied filter. + * + * @author Bradley S. Huffman + * @version $Revision: 1.6 $, $Date: 2007/11/10 05:28:59 $ + */ +class FilterIterator implements Iterator { + + private Iterator iterator; + private Filter filter; + private Object nextObject; + + private static final String CVS_ID = + "@(#) $RCSfile: FilterIterator.java,v $ $Revision: 1.6 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + public FilterIterator(Iterator iterator, Filter filter) { + if ((iterator == null) || (filter == null)) { + throw new IllegalArgumentException("null parameter"); + } + this.iterator = iterator; + this.filter = filter; + } + + public boolean hasNext() { + if (nextObject != null) { + return true; + } + + while (iterator.hasNext()) { + Object obj = iterator.next(); + if (filter.matches(obj)) { + nextObject = obj; + return true; + } + } + return false; + } + + public Object next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + Object obj = nextObject; + nextObject = null; + return obj; + } + + public void remove() { + // XXX Could cause probs for sure if hasNext() is + // called before the remove(), although that's unlikely. + iterator.remove(); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/IllegalAddException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/IllegalAddException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,323 @@\n+/*-- \n+\n+ $Id: IllegalAddException.java,v 1.26 2007/11/10 05:28:59 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+package org.jdom;\n+\n+/**\n+ * Thrown when trying to add a illegal object to a JDOM construct.\n+ *\n+ * @version $Revision: 1.26 $, $Date: 2007/11/10 05:28:59 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ */\n+public class IllegalAddException extends IllegalArgumentException {\n+\n+ private static final String CVS_ID = \n+ "@(#) $RCSfile: IllegalAddException.java,v $ $Revision: 1.26 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * This will create an <code>Exception</code> indicating\n+ * that the addition of the <code>{@link Attribute}</code>\n+ * to the <code>{@link Element}</code> is illegal.\n+ *\n+ * @param base <code>Element</code> that <code>Attribute</code>\n+ * couldn\'t be added to\n+ * @param added <code>Attribute</code> that could not be added\n+ * @param reason cause of the problem\n+ */\n+ IllegalAddException(Element base, Attribute added, String reason) {\n+ super(new StringBuffer()\n+ .append("The attribute \\"")\n+ .append(added.getQualifiedName())\n+ .append("\\" could not be added to the element \\"")\n+ .append(base.getQualifiedName())\n+ .append("\\": ")\n+ .append(reason)\n+ .toString());\n+ }\n+\n+ /**\n+ * This will create an <code>Exception</'..b't</code> that the <code>Comment</code>\n+ * couldn\'t be added to\n+ * @param added <code>Text</code> that could not be added\n+ * @param reason cause of the problem\n+ */\n+ IllegalAddException(Element base, Text added, String reason) {\n+ super(new StringBuffer()\n+ .append("The Text \\"")\n+ .append(added.getText())\n+ .append("\\" could not be added as content to \\"")\n+ .append(base.getQualifiedName())\n+ .append("\\": ")\n+ .append(reason)\n+ .toString());\n+ }\n+\n+ /**\n+ * This will create an <code>Exception</code> indicating\n+ * that the addition of the <code>{@link Comment}</code>\n+ * to the <code>{@link Document}</code> is illegal.\n+ *\n+ * @param added <code>Comment</code> that could not be added\n+ * @param reason cause of the problem\n+ */\n+ IllegalAddException(Comment added, String reason) {\n+ super(new StringBuffer()\n+ .append("The comment \\"")\n+ .append(added.getText())\n+ .append("\\" could not be added to the top level of the document: ")\n+ .append(reason)\n+ .toString());\n+ }\n+\n+ /**\n+ * This will create an <code>Exception</code> indicating\n+ * that the addition of the <code>{@link EntityRef}</code>\n+ * to the <code>{@link Element}</code> is illegal.\n+ *\n+ * @param base <code>Element</code> that the <code>EntityRef</code>\n+ * couldn\'t be added to\n+ * @param added <code>EntityRef</code> reference that could not be added\n+ * @param reason cause of the problem\n+ */\n+ IllegalAddException(Element base, EntityRef added, String reason) {\n+ super(new StringBuffer()\n+ .append("The entity reference\\"")\n+ .append(added.getName())\n+ .append("\\" could not be added as content to \\"")\n+ .append(base.getQualifiedName())\n+ .append("\\": ")\n+ .append(reason)\n+ .toString());\n+ }\n+\n+ /**\n+ * This will create an <code>Exception</code> indicating\n+ * that the addition of the <code>{@link Namespace}</code>\n+ * to the <code>{@link Element}</code> is illegal.\n+ *\n+ * @param base <code>Element</code> that the <code>Namespace</code>\n+ * couldn\'t be added to\n+ * @param added <code>Namespace</code> that could not be added\n+ * @param reason cause of the problem\n+ */\n+ IllegalAddException(Element base, Namespace added, String reason) {\n+ super(new StringBuffer()\n+ .append("The namespace xmlns")\n+ .append((added.getPrefix() == null ||\n+ added.getPrefix().equals("")) ? "=" \n+ : ":" + added.getPrefix() + "=")\n+ .append("\\"")\n+ .append(added.getURI())\n+ .append("\\" could not be added as a namespace to \\"")\n+ .append(base.getQualifiedName())\n+ .append("\\": ")\n+ .append(reason)\n+ .toString());\n+ }\n+\n+ /**\n+ * This will create an <code>Exception</code> indicating\n+ * that the addition of the <code>{@link DocType}</code>\n+ * to the <code>{@link Document}</code> is illegal.\n+ *\n+ * @param added <code>DocType</code> that could not be added\n+ * @param reason cause of the problem\n+ */\n+ IllegalAddException(DocType added, String reason) {\n+ super(new StringBuffer()\n+ .append("The DOCTYPE ")\n+ .append(added.toString())\n+ .append(" could not be added to the document: ")\n+ .append(reason)\n+ .toString());\n+ }\n+\n+ /**\n+ * This will create an <code>Exception</code> with the specified\n+ * error message.\n+ *\n+ * @param reason cause of the problem\n+ */\n+ public IllegalAddException(String reason) {\n+ super(reason);\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/IllegalDataException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/IllegalDataException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,118 @@ +/*-- + + $Id: IllegalDataException.java,v 1.14 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +/** + * Thrown when illegal text is supplied to a JDOM construct. + * + * @version $Revision: 1.14 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + * @author Elliotte Rusty Harold + */ +public class IllegalDataException extends IllegalArgumentException { + + private static final String CVS_ID = + "@(#) $RCSfile: IllegalDataException.java,v $ $Revision: 1.14 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This will create an <code>Exception</code> indicating + * that the specified data is illegal for the construct + * it was supplied to. + * + * @param data <code>String</code> data that breaks rules. + * @param construct <code>String</code> construct that data is illegal for. + * @param reason <code>String</code> message or reason data is illegal. + */ + IllegalDataException(String data, String construct, String reason) { + super(new StringBuffer() + .append("The data \"") + .append(data) + .append("\" is not legal for a JDOM ") + .append(construct) + .append(": ") + .append(reason) + .append(".") + .toString()); + } + + /** + * This will create an <code>Exception</code> indicating + * that the specified data is illegal for the construct + * it was supplied to. + * + * @param data <code>String</code> data that breaks rules. + * @param construct <code>String</code> construct that data is illegal for. + */ + IllegalDataException(String data, String construct) { + super(new StringBuffer() + .append("The data \"") + .append(data) + .append("\" is not legal for a JDOM ") + .append(construct) + .append(".") + .toString()); + } + + /** + * This will create an exceptoin with the specified error message. + * + * @param reason cause of the problem + */ + public IllegalDataException(String reason) { + super(reason); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/IllegalNameException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/IllegalNameException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,121 @@ +/*-- + + $Id: IllegalNameException.java,v 1.14 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +/** + * Thrown when a name is supplied in construction of a JDOM construct whose + * where the name breaks XML naming conventions. + * + * @version $Revision: 1.14 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + * @author Elliotte Rusty Harold + */ +public class IllegalNameException extends IllegalArgumentException { + + private static final String CVS_ID = + "@(#) $RCSfile: IllegalNameException.java,v $ $Revision: 1.14 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This will create an <code>Exception</code> indicating + * that the specified name is illegal for the construct + * it was supplied to. + * + * @param name <code>String</code> name that breaks rules. + * @param construct <code>String</code> name of JDOM construct + * that <code>name</code> was supplied to. + * @param reason <code>String</code> message or reason name is illegal. + */ + IllegalNameException(String name, String construct, String reason) { + super(new StringBuffer() + .append("The name \"") + .append(name) + .append("\" is not legal for JDOM/XML ") + .append(construct) + .append("s: ") + .append(reason) + .append(".") + .toString()); + } + + /** + * This will create an <code>Exception</code> indicating + * that the specified name is illegal for the construct + * it was supplied to. + * + * @param name <code>String</code> name that breaks rules. + * @param construct <code>String</code> name of JDOM construct + * that <code>name</code> was supplied to. + */ + IllegalNameException(String name, String construct) { + super(new StringBuffer() + .append("The name \"") + .append(name) + .append("\" is not legal for JDOM/XML ") + .append(construct) + .append("s.") + .toString()); + } + + /** + * Creates an exception with the specified error message. + * + * @param reason cause of the problem + */ + public IllegalNameException(String reason) { + super(reason); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/IllegalTargetException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/IllegalTargetException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,97 @@ +/*-- + + $Id: IllegalTargetException.java,v 1.15 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +/** + * Thrown when a target is supplied in construction of a JDOM {@link + * ProcessingInstruction}, and that name breaks XML naming conventions. + * + * @version $Revision: 1.15 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + */ +public class IllegalTargetException extends IllegalArgumentException { + + private static final String CVS_ID = + "@(#) $RCSfile: IllegalTargetException.java,v $ $Revision: 1.15 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This will create an <code>Exception</code> indicating + * that the specified target is illegal for the + * <code>{@link ProcessingInstruction}</code> it was supplied to. + * + * @param target <code>String</code> target that breaks rules. + * @param reason <code>String</code> message or reason target is illegal. + */ + IllegalTargetException(String target, String reason) { + super(new StringBuffer() + .append("The target \"") + .append(target) + .append("\" is not legal for JDOM/XML Processing Instructions: ") + .append(reason) + .append(".") + .toString()); + } + + /** + * Creates an exception with the specified error message. + * + * @param reason cause of the problem + */ + public IllegalTargetException(String reason) { + super(reason); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/JDOMException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/JDOMException.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,367 @@\n+/*-- \n+\n+ $Id: JDOMException.java,v 1.26 2008/12/10 00:59:51 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+package org.jdom;\n+\n+import java.io.*;\n+import java.lang.reflect.*;\n+import java.sql.*;\n+\n+import org.xml.sax.*;\n+\n+/**\n+ * The top level exception that JDOM classes can throw. Its subclasses add\n+ * specificity to the problems that can occur using JDOM. This single exception\n+ * can be caught to handle all JDOM specific problems (some methods may throw\n+ * {@link java.io.IOException} and such).\n+ *\n+ * @version $Revision: 1.26 $, $Date: 2008/12/10 00:59:51 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ */\n+public class JDOMException extends Exception {\n+\n+ private static final String CVS_ID = \n+ "@(#) $RCSfile: JDOMException.java,v $ $Revision: 1.26 $ $Date: 2008/12/10 00:59:51 $ $Name: jdom_1_1_1 $";\n+\n+ /** A wrapped <code>Throwable</code> */\n+ private Throwable cause;\n+\n+ /**\n+ * This will create an <code>Exception</code>.\n+ */\n+ public JDOMException() {\n+ super("Error occurred in JDOM application.");\n+ }\n+\n+ /**\n+ * This will create an <code>Exception</code> with the given message.\n+ *\n+ * @param message <code>String</code> message indicating\n+ * the problem that occurred.\n+ */ \n+ public JDOMException(String message) {\n+ super(message);\n+ }\n+\n+ /**\n+ * This will create an <code>Exception</code> with the given messag'..b' }\n+ \n+ if (parent instanceof SQLException) {\n+ return ((SQLException)parent).getNextException();\n+ }\n+ \n+ if (parent instanceof InvocationTargetException) {\n+ return ((InvocationTargetException)parent).getTargetException();\n+ }\n+ \n+ if (parent instanceof ExceptionInInitializerError) {\n+ return ((ExceptionInInitializerError)parent).getException();\n+ }\n+ \n+ // The RMI classes are not present in Android\'s Dalvik VM, so we use reflection to access them.\n+\n+ Throwable nestedException = getNestedExceptionFromField(parent, "java.rmi.RemoteException", "detail");\n+ if (nestedException != null) {\n+ return nestedException;\n+ }\n+ \n+ // These classes are not part of standard JDK 1.1 or 1.2, so again we use reflection to access them.\n+\n+ nestedException = getNestedException(parent, "javax.naming.NamingException", "getRootCause");\n+ if (nestedException != null) {\n+ return nestedException;\n+ }\n+ \n+ nestedException = getNestedException(parent, "javax.servlet.ServletException", "getRootCause");\n+ if (nestedException != null) {\n+ return nestedException;\n+ }\n+\n+ return null;\n+ }\n+\n+ // This method uses reflection to obtain the nest exception of a Throwable. We use reflection\n+ // because the desired class may not exist in the currently-running VM.\n+ private static Throwable getNestedException(\n+ Throwable parent, String className, String methodName) {\n+ try {\n+ // See if this Throwable is of the desired type, by using isAssignableFrom().\n+ Class testClass = Class.forName(className);\n+ Class objectClass = parent.getClass();\n+ if (testClass.isAssignableFrom(objectClass)) {\n+ // Use reflection to call the specified method.\n+ Class[] argClasses = new Class[0];\n+ Method method = testClass.getMethod(methodName, argClasses);\n+ Object[] args = new Object[0];\n+ return (Throwable)method.invoke(parent, args);\n+ }\n+ }\n+ catch(Exception ex) {\n+ // Most likely, the desired class is not available in this VM. That\'s fine.\n+ // Even if it\'s caused by something else, we don\'t want to display an error\n+ // here, since we\'re already in the process of trying to display the original\n+ // error - another error here will just confuse things.\n+ }\n+\n+ return null;\n+ }\n+\n+ // This method is similar to getNestedException() except it looks for a field instead\n+ // of a method.\n+ private static Throwable getNestedExceptionFromField(\n+ Throwable parent, String className, String fieldName) {\n+ try {\n+ // See if this Throwable is of the desired type, by using isAssignableFrom().\n+ Class testClass = Class.forName(className);\n+ Class objectClass = parent.getClass();\n+ if (testClass.isAssignableFrom(objectClass)) {\n+ // Use reflection to call the specified method.\n+ Class[] argClasses = new Class[0];\n+ Field field = testClass.getField(fieldName);\n+ return (Throwable)field.get(parent);\n+ }\n+ }\n+ catch(Exception ex) {\n+ // Most likely, the desired class is not available in this VM. That\'s fine.\n+ // Could be that the named field isn\'t of type Throwable, but that should happen\n+ // with proper call usage.\n+ // Even if it\'s caused by something else, we don\'t want to display an error\n+ // here, since we\'re already in the process of trying to display the original\n+ // error - another error here will just confuse things.\n+ }\n+\n+ return null;\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/JDOMFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/JDOMFactory.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,338 @@\n+/*--\n+\n+ $Id: JDOMFactory.java,v 1.9 2007/11/10 05:28:59 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+import java.util.*;\n+\n+/**\n+ * An interface to be used by builders when constructing JDOM objects. The\n+ * <code>DefaultJDOMFactory</code> creates the standard top-level JDOM classes\n+ * (Element, Document, Comment, etc). Another implementation of this factory\n+ * could be used to create custom classes.\n+ *\n+ * @version $Revision: 1.9 $, $Date: 2007/11/10 05:28:59 $\n+ * @author Ken Rune Holland\n+ * @author Phil Nelson\n+ * @author Bradley S. Huffman\n+ */\n+public interface JDOMFactory {\n+\n+ // **** constructing Attributes ****\n+\n+ /**\n+ * <p>\n+ * This will create a new <code>Attribute</code> with the\n+ * specified (local) name and value, and in the provided\n+ * <code>{@link org.jdom.Namespace}</code>.\n+ * </p>\n+ *\n+ * @param name <code>String</code> name of <code>Attribute</code>.\n+ * @param value <code>String</code> value for new attribute.\n+ */\n+ public Attribute attribute(String name, String value, Namespace namespace);\n+\n+ /**\n+ * This will create a new <code>Attribute</code> with the\n+ * specified (local) name, value, and type, and in the provided\n+ * <code>{@link org.jdom.Namespace}</code>.\n+ *\n+ * @param name <code>String</code> name of <code>Attribute</code>.\n+ * @param value <code>String</code> value for new attribute.\n+ * @param type <cod'..b' for document root\n+ */\n+ public Document document(Element rootElement);\n+\n+ // **** constructing Elements ****\n+\n+ /**\n+ * This will create a new <code>Element</code>\n+ * with the supplied (local) name, and define\n+ * the <code>{@link org.jdom.Namespace}</code> to be used.\n+ *\n+ * @param name <code>String</code> name of element.\n+ * @param namespace <code>Namespace</code> to put element in.\n+ */\n+ public Element element(String name, Namespace namespace);\n+\n+ /**\n+ * This will create an <code>Element</code> in no\n+ * <code>{@link org.jdom.Namespace}</code>.\n+ *\n+ * @param name <code>String</code> name of element.\n+ */\n+ public Element element(String name);\n+\n+ /**\n+ * This will create a new <code>Element</code> with\n+ * the supplied (local) name, and specifies the URI\n+ * of the <code>{@link org.jdom.Namespace}</code> the <code>Element</code>\n+ * should be in, resulting it being unprefixed (in the default\n+ * namespace).\n+ *\n+ * @param name <code>String</code> name of element.\n+ * @param uri <code>String</code> URI for <code>Namespace</code> element\n+ * should be in.\n+ */\n+ public Element element(String name, String uri);\n+\n+ /**\n+ * This will create a new <code>Element</code> with\n+ * the supplied (local) name, and specifies the prefix and URI\n+ * of the <code>{@link org.jdom.Namespace}</code> the <code>Element</code>\n+ * should be in.\n+ *\n+ * @param name <code>String</code> name of element.\n+ * @param uri <code>String</code> URI for <code>Namespace</code> element\n+ * should be in.\n+ */\n+ public Element element(String name, String prefix, String uri);\n+\n+ // **** constructing ProcessingInstruction ****\n+\n+ /**\n+ * This will create a new <code>ProcessingInstruction</code>\n+ * with the specified target and data.\n+ *\n+ * @param target <code>String</code> target of PI.\n+ * @param data <code>Map</code> data for PI, in\n+ * name/value pairs\n+ */\n+ public ProcessingInstruction processingInstruction(String target,\n+ Map data);\n+\n+ /**\n+ * This will create a new <code>ProcessingInstruction</code>\n+ * with the specified target and data.\n+ *\n+ * @param target <code>String</code> target of PI.\n+ * @param data <code>String</code> data for PI.\n+ */\n+ public ProcessingInstruction processingInstruction(String target,\n+ String data);\n+\n+ // **** constructing EntityRef ****\n+\n+ /**\n+ * This will create a new <code>EntityRef</code>\n+ * with the supplied name.\n+ *\n+ * @param name <code>String</code> name of element.\n+ */\n+ public EntityRef entityRef(String name);\n+\n+ /**\n+ * This will create a new <code>EntityRef</code>\n+ * with the supplied name, public ID, and system ID.\n+ *\n+ * @param name <code>String</code> name of element.\n+ * @param publicID <code>String</code> public ID of element.\n+ * @param systemID <code>String</code> system ID of element.\n+ */\n+ public EntityRef entityRef(String name, String publicID, String systemID);\n+\n+ /**\n+ * This will create a new <code>EntityRef</code>\n+ * with the supplied name and system ID.\n+ *\n+ * @param name <code>String</code> name of element.\n+ * @param systemID <code>String</code> system ID of element.\n+ */\n+ public EntityRef entityRef(String name, String systemID);\n+\n+ // =====================================================================\n+ // List manipulation\n+ // =====================================================================\n+\n+ public void addContent(Parent parent, Content content);\n+\n+ public void setAttribute(Element element, Attribute a);\n+\n+ public void addNamespaceDeclaration(Element element, Namespace additional);\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Namespace.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Namespace.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,276 @@\n+/*-- \n+\n+ $Id: Namespace.java,v 1.44 2008/12/17 23:22:48 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+package org.jdom;\n+\n+import java.util.*;\n+\n+/**\n+ * An XML namespace representation, as well as a factory for creating XML\n+ * namespace objects. Namespaces are not Serializable, however objects that use\n+ * namespaces have special logic to handle serialization manually. These classes\n+ * call the getNamespace() method on deserialization to ensure there is one\n+ * unique Namespace object for any unique prefix/uri pair.\n+ *\n+ * @version $Revision: 1.44 $, $Date: 2008/12/17 23:22:48 $\n+ * @author Brett McLaughlin\n+ * @author Elliotte Rusty Harold\n+ * @author Jason Hunter\n+ * @author Wesley Biggs\n+ */\n+public final class Namespace {\n+\n+ // XXX May want to use weak references to keep the maps from growing \n+ // large with extended use\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: Namespace.java,v $ $Revision: 1.44 $ $Date: 2008/12/17 23:22:48 $ $Name: jdom_1_1_1 $";\n+\n+ /** \n+ * Factory list of namespaces. \n+ * Keys are <i>prefix</i>&<i>URI</i>. \n+ * Values are Namespace objects \n+ */\n+ private static HashMap namespaces;\n+\n+ /** Define a <code>Namespace</code> for when <i>not</i> in a namespace */\n+ public static final Namespace NO_NAMESPACE = new Namespace("", "");\n+\n+ /** Define a <code>Namespace</code> for the standard xml prefix. */\n+ public static final Namespace XML'..b'ect\n+ // namespace and prefix -- xml, http://www.w3.org/XML/1998/namespace\n+ // -- then it was already returned from the preexisting namespaces.\n+ // Thus any use of the xml prefix or the\n+ // http://www.w3.org/XML/1998/namespace URI at this point must be\n+ // incorrect. \n+ if (prefix.equals("xml")) {\n+ throw new IllegalNameException(prefix, "Namespace prefix",\n+ "The xml prefix can only be bound to " +\n+ "http://www.w3.org/XML/1998/namespace"); \n+ }\n+\n+ // The erratum to Namespaces in XML 1.0 that suggests this \n+ // next check is controversial. Not everyone accepts it. \n+ if (uri.equals("http://www.w3.org/XML/1998/namespace")) {\n+ throw new IllegalNameException(uri, "Namespace URI",\n+ "The http://www.w3.org/XML/1998/namespace must be bound to " +\n+ "the xml prefix."); \n+ }\n+\n+ // Finally, store and return\n+ Namespace ns = new Namespace(prefix, uri);\n+ synchronized (namespaces) {\n+ namespaces.put(lookup, ns);\n+ }\n+ return ns;\n+ }\n+\n+ /**\n+ * This will retrieve (if in existence) or create (if not) a \n+ * <code>Namespace</code> for the supplied URI, and make it usable \n+ * as a default namespace, as no prefix is supplied.\n+ *\n+ * @param uri <code>String</code> URI of new <code>Namespace</code>.\n+ * @return <code>Namespace</code> - ready to use namespace.\n+ */\n+ public static Namespace getNamespace(String uri) {\n+ return getNamespace("", uri);\n+ }\n+\n+ /**\n+ * This constructor handles creation of a <code>Namespace</code> object\n+ * with a prefix and URI; it is intentionally left <code>private</code>\n+ * so that it cannot be invoked by external programs/code.\n+ *\n+ * @param prefix <code>String</code> prefix to map to this namespace.\n+ * @param uri <code>String</code> URI for namespace.\n+ */\n+ private Namespace(String prefix, String uri) {\n+ this.prefix = prefix;\n+ this.uri = uri;\n+ }\n+\n+ /**\n+ * This returns the prefix mapped to this <code>Namespace</code>.\n+ *\n+ * @return <code>String</code> - prefix for this <code>Namespace</code>.\n+ */\n+ public String getPrefix() {\n+ return prefix;\n+ }\n+\n+ /**\n+ * This returns the namespace URI for this <code>Namespace</code>.\n+ *\n+ * @return <code>String</code> - URI for this <code>Namespace</code>.\n+ */\n+ public String getURI() {\n+ return uri;\n+ }\n+\n+ /**\n+ * This tests for equality - Two <code>Namespaces</code>\n+ * are equal if and only if their URIs are byte-for-byte equals.\n+ *\n+ * @param ob <code>Object</code> to compare to this <code>Namespace</code>.\n+ * @return <code>boolean</code> - whether the supplied object is equal to\n+ * this <code>Namespace</code>.\n+ */\n+ public boolean equals(Object ob) {\n+ if (this == ob) {\n+ return true;\n+ }\n+ if (ob instanceof Namespace) { // instanceof returns false if null\n+ return uri.equals(((Namespace)ob).uri);\n+ }\n+ return false;\n+ }\n+\n+ /**\n+ * This returns a <code>String</code> representation of this \n+ * <code>Namespace</code>, suitable for use in debugging.\n+ *\n+ * @return <code>String</code> - information about this instance.\n+ */\n+ public String toString() {\n+ return "[Namespace: prefix \\"" + prefix + "\\" is mapped to URI \\"" + \n+ uri + "\\"]";\n+ }\n+\n+ /**\n+ * This returns a probably unique hash code for the <code>Namespace</code>.\n+ * If two namespaces have the same URI, they are equal and have the same\n+ * hash code, even if they have different prefixes.\n+ *\n+ * @return <code>int</code> - hash code for this <code>Namespace</code>.\n+ */\n+ public int hashCode() {\n+ return uri.hashCode();\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/NamespaceKey.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/NamespaceKey.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,108 @@ +/*-- + + $Id: NamespaceKey.java,v 1.2 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom; + +import java.util.*; + +/** + * Key for storing a namespace representation in a map. + * + * @version $Revision: 1.2 $, $Date: 2007/11/10 05:28:59 $ + * @author Tatu Saloranta + * @author Bradley S. Huffman + */ +final class NamespaceKey { + + private static final String CVS_ID = + "@(#) $RCSfile: NamespaceKey.java,v $ $Revision: 1.2 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + private String prefix; + private String uri; + private int hash; + + public NamespaceKey(String prefix, String uri) { + this.prefix = prefix; + this.uri = uri; + this.hash = prefix.hashCode(); + } + + public NamespaceKey(Namespace namespace) { + this(namespace.getPrefix(), namespace.getURI()); + } + + public boolean equals(Object ob) { + if (this == ob) { + return true; + } + else if (ob instanceof NamespaceKey) { + NamespaceKey other = (NamespaceKey) ob; + return prefix.equals(other.prefix) && uri.equals(other.uri); + } + else { + return false; + } + } + + public int hashCode() { + return hash; + } + + public String toString() { + return "[NamespaceKey: prefix \"" + prefix + + "\" is mapped to URI \"" + uri + "\"]"; + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Parent.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Parent.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,239 @@\n+/*--\n+\n+ $Id: Parent.java,v 1.13 2007/11/10 05:28:59 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+import java.io.Serializable;\n+import java.util.*;\n+import org.jdom.filter.Filter;\n+\n+/**\n+ * Superclass for JDOM objects which are allowed to contain\n+ * {@link Content} content.\n+ *\n+ * @see org.jdom.Content\n+ * @see org.jdom.Document\n+ * @see org.jdom.Element\n+ *\n+ * @author Bradley S. Huffman\n+ * @author Jason Hunter\n+ * @version $Revision: 1.13 $, $Date: 2007/11/10 05:28:59 $\n+ */\n+public interface Parent extends Cloneable, Serializable {\n+\n+ /**\n+ * Returns the number of children in this parent\'s content list.\n+ * Children may be any {@link Content} type.\n+ *\n+ * @return number of children\n+ */\n+ int getContentSize();\n+\n+ /**\n+ * Returns the index of the supplied child in the content list,\n+ * or -1 if not a child of this parent.\n+ *\n+ * @param child child to search for\n+ * @return index of child, or -1 if not found\n+ */\n+ int indexOf(Content child);\n+\n+// /**\n+// * Starting at the given index (inclusive), returns the index of\n+// * the first child matching the supplied filter, or -1\n+// * if none is found.\n+// *\n+// * @return index of child, or -1 if none found\n+// */\n+// int indexOf(int index, Filter filter);\n+\n+ /**\n+ * Returns a list containing detached clones of this parent\'s content list.\n+ *\n+ * @return list of cl'..b'al traversal through the List is best done with an Iterator\n+ * since the underlying implement of {@link java.util.List#size} may\n+ * require walking the entire list and indexed lookups may require\n+ * starting at the beginning each time.\n+ *\n+ * @return a list of the content of the parent\n+ * @throws IllegalStateException if parent is a Document\n+ * and the root element is not set\n+ */\n+ List getContent();\n+\n+ /**\n+ * Returns as a {@link java.util.List} the content of\n+ * this parent that matches the supplied filter. The returned list is\n+ * <b>"live"</b> and in document order. Any modifications to it affect\n+ * the element\'s actual contents. Modifications are checked for\n+ * conformance to XML 1.0 rules.\n+ * <p>\n+ * Sequential traversal through the List is best done with an Iterator\n+ * since the underlying implement of {@link java.util.List#size} may\n+ * require walking the entire list and indexed lookups may require\n+ * starting at the beginning each time.\n+ *\n+ * @param filter filter to apply\n+ * @return a list of the content of the parent matching the filter\n+ * @throws IllegalStateException if parent is a Document\n+ * and the root element is not set\n+ */\n+ List getContent(Filter filter);\n+\n+ /**\n+ * Removes all content from this parent and returns the detached\n+ * children.\n+ *\n+ * @return list of the old content detached from this parent\n+ */\n+ List removeContent();\n+\n+ /**\n+ * Removes from this parent all child content matching the given filter\n+ * and returns a list of the detached children.\n+ *\n+ * @param filter filter to apply\n+ * @return list of the detached children matching the filter\n+ */\n+ List removeContent(Filter filter);\n+\n+ /**\n+ * Removes a single child node from the content list.\n+ *\n+ * @param child child to remove\n+ * @return whether the removal occurred\n+ */\n+ boolean removeContent(Content child);\n+\n+ /**\n+ * Removes and returns the child at the given\n+ * index, or returns null if there\'s no such child.\n+ *\n+ * @param index index of child to remove\n+ * @return detached child at given index or null if no\n+ * @throws IndexOutOfBoundsException if index is negative or beyond\n+ * the current number of children\n+ */\n+ Content removeContent(int index);\n+\n+ /**\n+ * Obtain a deep, unattached copy of this parent and it\'s children.\n+ *\n+ * @return a deep copy of this parent and it\'s children.\n+ */\n+ Object clone();\n+\n+ /**\n+ * Returns an {@link java.util.Iterator} that walks over all descendants\n+ * in document order.\n+ *\n+ * @return an iterator to walk descendants\n+ */\n+ Iterator getDescendants();\n+\n+ /**\n+ * Returns an {@link java.util.Iterator} that walks over all descendants\n+ * in document order applying the Filter to return only elements that\n+ * match the filter rule. With filters you can match only Elements,\n+ * only Comments, Elements or Comments, only Elements with a given name\n+ * and/or prefix, and so on.\n+ *\n+ * @param filter filter to select which descendants to see\n+ * @return an iterator to walk descendants that match a filter\n+ */\n+ Iterator getDescendants(Filter filter);\n+\n+ /**\n+ * Return this parent\'s parent, or null if this parent is currently\n+ * not attached to another parent. This is the same method as in Content but\n+ * also added to Parent to allow more easy up-the-tree walking.\n+ *\n+ * @return this parent\'s parent or null if none\n+ */\n+ Parent getParent();\n+\n+ /**\n+ * Return this parent\'s owning document or null if the branch containing\n+ * this parent is currently not attached to a document.\n+ *\n+ * @return this child\'s owning document or null if none\n+ */\n+ Document getDocument();\n+\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/ProcessingInstruction.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/ProcessingInstruction.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,473 @@\n+/*--\n+\n+ $Id: ProcessingInstruction.java,v 1.47 2007/11/10 05:28:59 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+import java.util.*;\n+\n+/**\n+ * An XML processing instruction. Methods allow the user to obtain the target of\n+ * the PI as well as its data. The data can always be accessed as a String or,\n+ * if the data appears akin to an attribute list, can be retrieved as name/value\n+ * pairs.\n+ *\n+ * @version $Revision: 1.47 $, $Date: 2007/11/10 05:28:59 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Steven Gould\n+ */\n+\n+public class ProcessingInstruction extends Content {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: ProcessingInstruction.java,v $ $Revision: 1.47 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $";\n+\n+ /** The target of the PI */\n+ protected String target;\n+\n+ /** The data for the PI as a String */\n+ protected String rawData;\n+\n+ /** The data for the PI in name/value pairs */\n+ protected Map mapData;\n+\n+ /**\n+ * Default, no-args constructor for implementations\n+ * to use if needed.\n+ */\n+ protected ProcessingInstruction() { }\n+\n+ /**\n+ * This will create a new <code>ProcessingInstruction</code>\n+ * with the specified target and data.\n+ *\n+ * @param target <code>String</code> target of PI.\n+ * @param data <code>Map</code> data for PI, in\n+ * name/value pairs\n+ * @throws IllegalTargetExcepti'..b' // System.out.println("Extracted (name, value) pair: ("\n+ // + name + ", \'" + value+"\')");\n+\n+ // If both a name and a value have been found, then add\n+ // them to the data Map\n+ if (name.length() > 0 && value != null) {\n+ //if (data.containsKey(name)) {\n+ // A repeat, that\'s a parse error, so return a null map\n+ //return new HashMap();\n+ //}\n+ //else {\n+ data.put(name, value);\n+ //}\n+ }\n+ }\n+\n+ return data;\n+ }\n+\n+ /**\n+ * This is a helper routine, only used by parseData, to extract a\n+ * quoted String from the input parameter, rawData. A quoted string\n+ * can use either single or double quotes, but they must match up.\n+ * A singly quoted string can contain an unbalanced amount of double\n+ * quotes, or vice versa. For example, the String "JDOM\'s the best"\n+ * is legal as is \'JDOM"s the best\'.\n+ *\n+ * @param rawData the input string from which a quoted string is to\n+ * be extracted.\n+ * @return the first quoted string encountered in the input data. If\n+ * no quoted string is found, then the empty string, "", is\n+ * returned.\n+ * @see #parseData\n+ */\n+ private static int[] extractQuotedString(String rawData) {\n+ // Remembers whether we\'re actually in a quoted string yet\n+ boolean inQuotes = false;\n+\n+ // Remembers which type of quoted string we\'re in\n+ char quoteChar = \'"\';\n+\n+ // Stores the position of the first character inside\n+ // the quoted string (i.e. the start of the return string)\n+ int start = 0;\n+\n+ // Iterate through the input string looking for the start\n+ // and end of the quoted string\n+ for (int pos=0; pos < rawData.length(); pos++) {\n+ char currentChar = rawData.charAt(pos);\n+ if (currentChar==\'"\' || currentChar==\'\\\'\') {\n+ if (!inQuotes) {\n+ // We\'re entering a quoted string\n+ quoteChar = currentChar;\n+ inQuotes = true;\n+ start = pos+1;\n+ }\n+ else if (quoteChar == currentChar) {\n+ // We\'re leaving a quoted string\n+ inQuotes = false;\n+ return new int[] { start, pos };\n+ }\n+ // Otherwise we\'ve encountered a quote\n+ // inside a quote, so just continue\n+ }\n+ }\n+\n+ return null;\n+ }\n+\n+ /**\n+ * This returns a <code>String</code> representation of the\n+ * <code>ProcessingInstruction</code>, suitable for debugging. If the XML\n+ * representation of the <code>ProcessingInstruction</code> is desired,\n+ * {@link org.jdom.output.XMLOutputter#outputString(ProcessingInstruction)}\n+ * should be used.\n+ *\n+ * @return <code>String</code> - information about the\n+ * <code>ProcessingInstruction</code>\n+ */\n+ public String toString() {\n+ return new StringBuffer()\n+ .append("[ProcessingInstruction: ")\n+ .append(new org.jdom.output.XMLOutputter().outputString(this))\n+ .append("]")\n+ .toString();\n+ }\n+\n+ /**\n+ * This will return a clone of this <code>ProcessingInstruction</code>.\n+ *\n+ * @return <code>Object</code> - clone of this\n+ * <code>ProcessingInstruction</code>.\n+ */\n+ public Object clone() {\n+ ProcessingInstruction pi = (ProcessingInstruction) super.clone();\n+\n+ // target and rawdata are immutable and references copied by\n+ // Object.clone()\n+\n+ // Create a new Map object for the clone (since Map isn\'t Cloneable)\n+ if (mapData != null) {\n+ pi.mapData = parseData(rawData);\n+ }\n+ return pi;\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Text.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Text.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,271 @@\n+/*--\n+\n+ $Id: Text.java,v 1.25 2007/11/10 05:28:59 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom;\n+\n+/**\n+ * Character-based XML content. Provides a modular, parentable method of\n+ * representing text. Text makes no guarantees about the underlying textual\n+ * representation of character data, but does expose that data as a Java String.\n+ *\n+ * @version $Revision: 1.25 $, $Date: 2007/11/10 05:28:59 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Bradley S. Huffman\n+ */\n+public class Text extends Content {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: Text.java,v $ $Revision: 1.25 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $";\n+\n+ static final String EMPTY_STRING = "";\n+\n+ /** The actual character content */\n+ // XXX See http://www.servlets.com/archive/servlet/ReadMsg?msgId=8612\n+ // from elharo for a description of why Java characters may not suffice\n+ // long term\n+ protected String value;\n+\n+ /**\n+ * This is the protected, no-args constructor standard in all JDOM\n+ * classes. It allows subclassers to get a raw instance with no\n+ * initialization.\n+ */\n+ protected Text() { }\n+\n+ /**\n+ * This constructor creates a new <code>Text</code> node, with the\n+ * supplied string value as it\'s character content.\n+ *\n+ * @param str the node\'s character content.\n+ * @throws IllegalDataException if <code>str</code> contains an\n+ * '..b'nly whitespace exists, the empty string is returned.\n+ * <p>\n+ * Per XML 1.0 Production 3 whitespace includes: #x20, #x9, #xD, #xA\n+ * </p>\n+ *\n+ * @param str string to be normalized.\n+ * @return normalized string or empty string\n+ */\n+ public static String normalizeString(String str) {\n+ if (str == null)\n+ return EMPTY_STRING;\n+\n+ char[] c = str.toCharArray();\n+ char[] n = new char[c.length];\n+ boolean white = true;\n+ int pos = 0;\n+ for (int i = 0; i < c.length; i++) {\n+ if (" \\t\\n\\r".indexOf(c[i]) != -1) {\n+ if (!white) {\n+ n[pos++] = \' \';\n+ white = true;\n+ }\n+ }\n+ else {\n+ n[pos++] = c[i];\n+ white = false;\n+ }\n+ }\n+ if (white && pos > 0) {\n+ pos--;\n+ }\n+ return new String(n, 0, pos);\n+ }\n+\n+ /**\n+ * This will set the value of this <code>Text</code> node.\n+ *\n+ * @param str value for node\'s content.\n+ * @return the object on which the method was invoked\n+ * @throws IllegalDataException if <code>str</code> contains an\n+ * illegal character such as a vertical tab (as determined\n+ * by {@link org.jdom.Verifier#checkCharacterData})\n+ */\n+ public Text setText(String str) {\n+ String reason;\n+\n+ if (str == null) {\n+ value = EMPTY_STRING;\n+ return this;\n+ }\n+\n+ if ((reason = Verifier.checkCharacterData(str)) != null) {\n+ throw new IllegalDataException(str, "character content", reason);\n+ }\n+ value = str;\n+ return this;\n+ }\n+\n+ /**\n+ * This will append character content to whatever content already\n+ * exists within this <code>Text</code> node.\n+ *\n+ * @param str character content to append.\n+ * @throws IllegalDataException if <code>str</code> contains an\n+ * illegal character such as a vertical tab (as determined\n+ * by {@link org.jdom.Verifier#checkCharacterData})\n+ */\n+ public void append(String str) {\n+ String reason;\n+\n+ if (str == null) {\n+ return;\n+ }\n+ if ((reason = Verifier.checkCharacterData(str)) != null) {\n+ throw new IllegalDataException(str, "character content", reason);\n+ }\n+\n+ if (str == EMPTY_STRING)\n+ value = str;\n+ else value += str;\n+ }\n+\n+ /**\n+ * This will append the content of another <code>Text</code> node\n+ * to this node.\n+ *\n+ * @param text Text node to append.\n+ */\n+ public void append(Text text) {\n+ if (text == null) {\n+ return;\n+ }\n+ value += text.getText();\n+ }\n+\n+ /**\n+ * Returns the XPath 1.0 string value of this element, which is the\n+ * text itself.\n+ *\n+ * @return the text\n+ */\n+ public String getValue() {\n+ return value;\n+ }\n+\n+ /**\n+ * This returns a <code>String</code> representation of the\n+ * <code>Text</code> node, suitable for debugging. If the XML\n+ * representation of the <code>Text</code> node is desired,\n+ * either <code>{@link #getText}</code> or\n+ * {@link org.jdom.output.XMLOutputter#outputString(Text)}</code>\n+ * should be used.\n+ *\n+ * @return <code>String</code> - information about this node.\n+ */\n+ public String toString() {\n+ return new StringBuffer(64)\n+ .append("[Text: ")\n+ .append(getText())\n+ .append("]")\n+ .toString();\n+ }\n+\n+ /**\n+ * This will return a clone of this <code>Text</code> node, with the\n+ * same character content, but no parent.\n+ *\n+ * @return <code>Text</code> - cloned node.\n+ */\n+ public Object clone() {\n+ Text text = (Text)super.clone();\n+ text.value = value;\n+ return text;\n+ }\n+\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/UncheckedJDOMFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/UncheckedJDOMFactory.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,287 @@\n+/*-- \n+\n+ $Id: UncheckedJDOMFactory.java,v 1.4 2007/11/10 05:28:59 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+package org.jdom;\n+\n+import java.util.*;\n+\n+/**\n+ * Special factory for building documents without any content or structure\n+ * checking. This should only be used when you are 100% positive that the\n+ * input is absolutely correct. This factory can speed builds, but any\n+ * problems in the input will be uncaught until later when they could cause\n+ * infinite loops, malformed XML, or worse. Use with extreme caution.\n+ */\n+public class UncheckedJDOMFactory implements JDOMFactory {\n+\n+ // =====================================================================\n+ // Element Factory\n+ // =====================================================================\n+\n+ public Element element(String name, Namespace namespace) {\n+ Element e = new Element();\n+ e.name = name;\n+ if (namespace == null) {\n+ namespace = Namespace.NO_NAMESPACE;\n+ }\n+ e.namespace = namespace;\n+ return e;\n+ }\n+\n+ public Element element(String name) {\n+ Element e = new Element();\n+ e.name = name;\n+ e.namespace = Namespace.NO_NAMESPACE;\n+ return e;\n+ }\n+\n+ public Element element(String name, String uri) {\n+ return element(name, Namespace.getNamespace("", uri));\n+ }\n+\n+ public Element element(String name, String prefix, String uri) {\n+ return elem'..b'==\n+\n+ public Comment comment(String str) {\n+ Comment c = new Comment();\n+ c.text = str;\n+ return c;\n+ }\n+\n+ // =====================================================================\n+ // Processing Instruction Factory\n+ // =====================================================================\n+\n+ public ProcessingInstruction processingInstruction(String target, Map data) {\n+ ProcessingInstruction p = new ProcessingInstruction();\n+ p.target = target;\n+ p.setData(data);\n+ return p;\n+ }\n+\n+ public ProcessingInstruction processingInstruction(String target, String data) {\n+ ProcessingInstruction p = new ProcessingInstruction();\n+ p.target = target;\n+ p.setData(data);\n+ return p;\n+ }\n+\n+ // =====================================================================\n+ // Entity Ref Factory\n+ // =====================================================================\n+\n+ public EntityRef entityRef(String name) {\n+ EntityRef e = new org.jdom.EntityRef();\n+ e.name = name;\n+ return e;\n+ }\n+\n+ public EntityRef entityRef(String name, String systemID) {\n+ EntityRef e = new EntityRef();\n+ e.name = name;\n+ e.systemID = systemID;\n+ return e;\n+ }\n+\n+ public EntityRef entityRef(String name, String publicID, String systemID) {\n+ EntityRef e = new EntityRef();\n+ e.name = name;\n+ e.publicID = publicID;\n+ e.systemID = systemID;\n+ return e;\n+ }\n+\n+ // =====================================================================\n+ // DocType Factory\n+ // =====================================================================\n+\n+ public DocType docType(String elementName, String publicID, String systemID) {\n+ DocType d = new DocType();\n+ d.elementName = elementName;\n+ d.publicID = publicID;\n+ d.systemID = systemID;\n+ return d;\n+ }\n+\n+ public DocType docType(String elementName, String systemID) {\n+ return docType(elementName, null, systemID);\n+ }\n+\n+ public DocType docType(String elementName) {\n+ return docType(elementName, null, null);\n+ }\n+\n+ // =====================================================================\n+ // Document Factory\n+ // =====================================================================\n+\n+ public Document document(Element rootElement, DocType docType, String baseURI) {\n+ Document d = new Document();\n+ if (docType != null) {\n+ addContent(d, docType);\n+ }\n+ if (rootElement != null) {\n+ addContent(d, rootElement);\n+ }\n+ if (baseURI != null) {\n+ d.baseURI = baseURI;\n+ }\n+ return d;\n+ }\n+\n+ public Document document(Element rootElement, DocType docType) {\n+ return document(rootElement, docType, null);\n+ }\n+\n+ public Document document(Element rootElement) {\n+ return document(rootElement, null, null);\n+ }\n+\n+ // =====================================================================\n+ // List manipulation\n+ // =====================================================================\n+\n+ public void addContent(Parent parent, Content child) {\n+ if (parent instanceof Element) {\n+ Element elt = (Element) parent;\n+ elt.content.uncheckedAddContent(child);\n+ }\n+ else {\n+ Document doc = (Document) parent;\n+ doc.content.uncheckedAddContent(child);\n+ }\n+ }\n+\n+ public void setAttribute(Element parent, Attribute a) {\n+ parent.attributes.uncheckedAddAttribute(a);\n+ }\n+\n+ public void addNamespaceDeclaration(Element parent, Namespace additional) {\n+ if (parent.additionalNamespaces == null) {\n+ parent.additionalNamespaces = new ArrayList(5); //Element.INITIAL_ARRAY_SIZE\n+ }\n+ parent.additionalNamespaces.add(additional);\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/Verifier.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/Verifier.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,1271 @@\n+/*-- \n+\n+ $Id: Verifier.java,v 1.57 2009/07/23 05:54:23 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+package org.jdom;\n+\n+import java.util.*;\n+\n+/**\n+ * A utility class to handle well-formedness checks on names, data, and other\n+ * verification tasks for JDOM. The class is final and may not be subclassed.\n+ *\n+ * @version $Revision: 1.57 $, $Date: 2009/07/23 05:54:23 $\n+ * @author Brett McLaughlin\n+ * @author Elliotte Rusty Harold\n+ * @author Jason Hunter\n+ * @author Bradley S. Huffman\n+ */\n+final public class Verifier {\n+\n+ private static final String CVS_ID = \n+ "@(#) $RCSfile: Verifier.java,v $ $Revision: 1.57 $ $Date: 2009/07/23 05:54:23 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * Ensure instantation cannot occur.\n+ */\n+ private Verifier() { }\n+\n+ /**\n+ * This will check the supplied name to see if it is legal for use as\n+ * a JDOM <code>{@link Element}</code> name.\n+ *\n+ * @param name <code>String</code> name to check.\n+ * @return <code>String</code> reason name is illegal, or\n+ * <code>null</code> if name is OK.\n+ */\n+ public static String checkElementName(String name) {\n+ // Check basic XML name rules first\n+ String reason;\n+ if ((reason = checkXMLName(name)) != null) {\n+ return reason;\n+ }\n+\n+ // No colons allowed, since elements handle this internally\n+ if (name.indexOf(":") != -1) {\n+ return "Element na'..b" if (c < 0x0F90) return false; if (c <= 0x0F95) return true;\n+ if (c == 0x0F97) return true;\n+ if (c < 0x0F99) return false; if (c <= 0x0FAD) return true;\n+ \n+ if (c < 0x0FB1) return false; if (c <= 0x0FB7) return true;\n+ if (c == 0x0FB9) return true;\n+ if (c < 0x20D0) return false; if (c <= 0x20DC) return true;\n+ if (c == 0x20E1) return true;\n+ \n+ if (c < 0x302A) return false; if (c <= 0x302F) return true;\n+ if (c == 0x3099) return true;\n+ if (c == 0x309A) return true; \n+ \n+ return false;\n+ \n+ }\n+ \n+ /**\n+ * This is a utility function for determining whether a specified \n+ * character is an extender according to production 88 of the XML 1.0\n+ * specification.\n+ *\n+ * @param c <code>char</code> to check.\n+ * @return <code>String</code> true if it's an extender, false otherwise.\n+ */\n+ public static boolean isXMLExtender(char c) {\n+\n+ if (c < 0x00B6) return false; // quick short circuit\n+\n+ // Extenders \n+ if (c == 0x00B7) return true;\n+ if (c == 0x02D0) return true;\n+ if (c == 0x02D1) return true;\n+ if (c == 0x0387) return true;\n+ if (c == 0x0640) return true;\n+ if (c == 0x0E46) return true;\n+ if (c == 0x0EC6) return true;\n+ if (c == 0x3005) return true;\n+ \n+ if (c < 0x3031) return false; if (c <= 0x3035) return true;\n+ if (c < 0x309D) return false; if (c <= 0x309E) return true;\n+ if (c < 0x30FC) return false; if (c <= 0x30FE) return true;\n+ \n+ return false;\n+ \n+ }\n+ \n+ /**\n+ * This is a utility function for determining whether a specified \n+ * Unicode character\n+ * is a digit according to production 88 of the XML 1.0 specification.\n+ *\n+ * @param c <code>char</code> to check for XML digit compliance\n+ * @return <code>boolean</code> true if it's a digit, false otherwise\n+ */\n+ public static boolean isXMLDigit(char c) {\n+ \n+ if (c < 0x0030) return false; if (c <= 0x0039) return true;\n+ if (c < 0x0660) return false; if (c <= 0x0669) return true;\n+ if (c < 0x06F0) return false; if (c <= 0x06F9) return true;\n+ if (c < 0x0966) return false; if (c <= 0x096F) return true;\n+ \n+ if (c < 0x09E6) return false; if (c <= 0x09EF) return true;\n+ if (c < 0x0A66) return false; if (c <= 0x0A6F) return true;\n+ if (c < 0x0AE6) return false; if (c <= 0x0AEF) return true;\n+ \n+ if (c < 0x0B66) return false; if (c <= 0x0B6F) return true;\n+ if (c < 0x0BE7) return false; if (c <= 0x0BEF) return true;\n+ if (c < 0x0C66) return false; if (c <= 0x0C6F) return true;\n+ \n+ if (c < 0x0CE6) return false; if (c <= 0x0CEF) return true;\n+ if (c < 0x0D66) return false; if (c <= 0x0D6F) return true;\n+ if (c < 0x0E50) return false; if (c <= 0x0E59) return true;\n+ \n+ if (c < 0x0ED0) return false; if (c <= 0x0ED9) return true;\n+ if (c < 0x0F20) return false; if (c <= 0x0F29) return true; \n+ \n+ return false;\n+ } \n+ \n+ /**\n+ * This is a utility function for determining whether a specified \n+ * Unicode character is a whitespace character according to production 3\n+ * of the XML 1.0 specification.\n+ *\n+ * @param c <code>char</code> to check for XML whitespace compliance\n+ * @return <code>boolean</code> true if it's a whitespace, false otherwise\n+ */\n+ public static boolean isXMLWhitespace(char c) {\n+ if (c==' ' || c=='\\n' || c=='\\t' || c=='\\r' ){\n+ return true;\n+ }\n+ return false;\n+ }\n+}\n" |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/AbstractDOMAdapter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/AbstractDOMAdapter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,172 @@ +/*-- + + $Id: AbstractDOMAdapter.java,v 1.21 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.adapters; + +import java.io.*; +import java.lang.reflect.*; + +import org.jdom.*; +import org.w3c.dom.*; +import org.w3c.dom.Document; + +/** + * A DOMAdapter utility abstract base class. + * + * @version $Revision: 1.21 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + * @author Jason Hunter + */ +public abstract class AbstractDOMAdapter implements DOMAdapter { + + private static final String CVS_ID = + "@(#) $RCSfile: AbstractDOMAdapter.java,v $ $Revision: 1.21 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This creates a new <code>{@link Document}</code> from an + * existing <code>InputStream</code> by letting a DOM + * parser handle parsing using the supplied stream. + * + * @param filename file to parse. + * @param validate <code>boolean</code> to indicate if validation should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public Document getDocument(File filename, boolean validate) + throws IOException, JDOMException { + + return getDocument(new FileInputStream(filename), validate); + } + + /** + * This creates a new <code>{@link Document}</code> from an + * existing <code>InputStream</code> by letting a DOM + * parser handle parsing using the supplied stream. + * + * @param in <code>InputStream</code> to parse. + * @param validate <code>boolean</code> to indicate if validation should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public abstract Document getDocument(InputStream in, boolean validate) + throws IOException, JDOMException; + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation. + * + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public abstract Document createDocument() throws JDOMException; + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation with the given DOCTYPE. + * If the doctype parameter is null, the behavior is the same as + * calling <code>createDocument()</code>. + * + * @param doctype Initial <code>DocType</code> of the document. + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public Document createDocument(DocType doctype) throws JDOMException { + if (doctype == null) { + return createDocument(); + } + + DOMImplementation domImpl = createDocument().getImplementation(); + DocumentType domDocType = domImpl.createDocumentType( + doctype.getElementName(), + doctype.getPublicID(), + doctype.getSystemID()); + + // Set the internal subset if possible + setInternalSubset(domDocType, doctype.getInternalSubset()); + + return domImpl.createDocument("http://temporary", + doctype.getElementName(), + domDocType); + } + + /** + * This attempts to change the DocumentType to have the given internal DTD + * subset value. This is not a standard ability in DOM, so it's only + * available with some parsers. Subclasses can alter the mechanism by + * which the attempt is made to set the value. + * + * @param dt DocumentType to be altered + * @param s String to use as the internal DTD subset + */ + protected void setInternalSubset(DocumentType dt, String s) { + if (dt == null || s == null) return; + + // Default behavior is to attempt a setInternalSubset() call using + // reflection. This method is not part of the DOM spec, but it's + // available on Xerces 1.4.4+. It's not currently in Crimson. + try { + Class dtclass = dt.getClass(); + Method setInternalSubset = dtclass.getMethod( + "setInternalSubset", new Class[] {java.lang.String.class}); + setInternalSubset.invoke(dt, new Object[] {s}); + } + catch (Exception e) { + // ignore + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/CrimsonDOMAdapter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/CrimsonDOMAdapter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,146 @@ +/*-- + + $Id: CrimsonDOMAdapter.java,v 1.17 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.adapters; + +import java.io.*; +import java.lang.reflect.*; + +import org.jdom.*; +import org.w3c.dom.Document; +import org.xml.sax.*; + +/** + * An adapter for the Apache Crimson DOM parser. + * + * @version $Revision: 1.17 $, $Date: 2007/11/10 05:28:59 $ + * @author Jason Hunter + */ +public class CrimsonDOMAdapter extends AbstractDOMAdapter { + + private static final String CVS_ID = + "@(#) $RCSfile: CrimsonDOMAdapter.java,v $ $Revision: 1.17 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This creates a new <code>{@link Document}</code> from an + * existing <code>InputStream</code> by letting a DOM + * parser handle parsing using the supplied stream. + * + * @param in <code>InputStream</code> to parse. + * @param validate <code>boolean</code> to indicate if validation should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public Document getDocument(InputStream in, boolean validate) + throws IOException, JDOMException { + + try { + Class[] parameterTypes = new Class[2]; + parameterTypes[0] = Class.forName("java.io.InputStream"); + parameterTypes[1] = boolean.class; + + Object[] args = new Object[2]; + args[0] = in; + args[1] = new Boolean(false); + + // Load the parser class and invoke the parse method + Class parserClass = Class.forName("org.apache.crimson.tree.XmlDocument"); + Method createXmlDocument = + parserClass.getMethod("createXmlDocument", parameterTypes); + Document doc = + (Document)createXmlDocument.invoke(null, args); + + return doc; + + } catch (InvocationTargetException e) { + Throwable targetException = e.getTargetException(); + if (targetException instanceof org.xml.sax.SAXParseException) { + SAXParseException parseException = (SAXParseException)targetException; + throw new JDOMException("Error on line " + parseException.getLineNumber() + + " of XML document: " + parseException.getMessage(), parseException); + } else if (targetException instanceof IOException) { + IOException ioException = (IOException) targetException; + throw ioException; + } else { + throw new JDOMException(targetException.getMessage(), targetException); + } + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage(), e); + } + } + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation. + * + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public Document createDocument() throws JDOMException { + try { + return + (Document)Class.forName( + "org.apache.crimson.tree.XmlDocument") + .newInstance(); + + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage() + " when creating document", e); + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/DOMAdapter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/DOMAdapter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,123 @@ +/*-- + + $Id: DOMAdapter.java,v 1.22 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.adapters; + +import java.io.*; + +import org.jdom.*; +import org.w3c.dom.Document; + +/** + * Defines a standard set of adapter methods for interfacing with a DOM parser + * and obtaining a DOM {@link org.w3c.dom.Document org.w3c.dom.Document} object. + * Implementing classes map these calls to DOM parser-specific calls, allowing + * any third-party parser to be used with JDOM. + * + * @version $Revision: 1.22 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + * @author Jason Hunter + */ +public interface DOMAdapter { + + /** + * This creates a new <code>Document</code> from a + * given filename by letting a DOM parser handle parsing from the file. + * + * @param filename file to parse. + * @param validate <code>boolean</code> to indicate if validation + * should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public Document getDocument(File filename, boolean validate) + throws IOException, JDOMException; + + /** + * This creates a new <code>Document</code> from an + * existing <code>InputStream</code> by letting a DOM + * parser handle parsing using the supplied stream. + * + * @param in <code>InputStream</code> to parse. + * @param validate <code>boolean</code> to indicate if validation + * should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public Document getDocument(InputStream in, boolean validate) + throws IOException, JDOMException; + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation. + * + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public Document createDocument() throws JDOMException; + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation with the given DOCTYPE. + * + * @param doctype Initial <code>DocType</code> of the document. + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public Document createDocument(DocType doctype) throws JDOMException; +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/JAXPDOMAdapter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/JAXPDOMAdapter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,195 @@\n+/*-- \n+\n+ $Id: JAXPDOMAdapter.java,v 1.13 2007/11/10 05:28:59 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+package org.jdom.adapters;\n+\n+import java.io.*;\n+import java.lang.reflect.*;\n+\n+import org.jdom.*;\n+import org.jdom.input.*;\n+import org.w3c.dom.Document;\n+\n+/**\n+ * An adapter for any parser supporting the Sun JAXP APIs.\n+ * \n+ * @version $Revision: 1.13 $, $Date: 2007/11/10 05:28:59 $\n+ * @author Jason Hunter\n+ */\n+public class JAXPDOMAdapter extends AbstractDOMAdapter {\n+\n+ private static final String CVS_ID = \n+ "@(#) $RCSfile: JAXPDOMAdapter.java,v $ $Revision: 1.13 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * This creates a new <code>{@link Document}</code> from an\n+ * existing <code>InputStream</code> by letting a JAXP\n+ * parser handle parsing using the supplied stream.\n+ *\n+ * @param in <code>InputStream</code> to parse.\n+ * @param validate <code>boolean</code> to indicate if validation \n+ * should occur.\n+ * @return <code>Document</code> - instance ready for use.\n+ * @throws IOException when I/O error occurs.\n+ * @throws JDOMException when errors occur in parsing.\n+ */\n+ public Document getDocument(InputStream in, boolean validate)\n+ throws IOException, JDOMException {\n+\n+ try {\n+ // Try using JAXP...\n+ // Note we need DOM Level 2 and thus JAXP 1.1.\n+ Class.forName("javax.xml.transform.Tra'..b' Method newParserInstance =\n+ factoryClass.getMethod("newInstance", null);\n+ Object factory = newParserInstance.invoke(null, null);\n+\n+ // factory.setValidating(validate);\n+ Method setValidating =\n+ factoryClass.getMethod("setValidating",\n+ new Class[]{boolean.class});\n+ setValidating.invoke(factory,\n+ new Object[]{new Boolean(validate)});\n+\n+ // factory.setNamespaceAware(true);\n+ Method setNamespaceAware =\n+ factoryClass.getMethod("setNamespaceAware",\n+ new Class[]{boolean.class});\n+ setNamespaceAware.invoke(factory,\n+ new Object[]{Boolean.TRUE});\n+ \n+ // jaxpParser = factory.newDocumentBuilder();\n+ Method newDocBuilder =\n+ factoryClass.getMethod("newDocumentBuilder", null);\n+ Object jaxpParser = newDocBuilder.invoke(factory, null);\n+\n+ // jaxpParser.setErrorHandler(null);\n+ Class parserClass = jaxpParser.getClass();\n+ Method setErrorHandler =\n+ parserClass.getMethod("setErrorHandler",\n+ new Class[]{org.xml.sax.ErrorHandler.class});\n+ setErrorHandler.invoke(jaxpParser,\n+ new Object[]{new BuilderErrorHandler()});\n+\n+ // domDoc = jaxpParser.parse(in);\n+ Method parse = parserClass.getMethod(\n+ "parse", new Class[]{InputStream.class});\n+ org.w3c.dom.Document domDoc = (org.w3c.dom.Document)\n+ parse.invoke(jaxpParser, new Object[]{in});\n+\n+ return domDoc;\n+ } catch (InvocationTargetException e) {\n+ Throwable targetException = e.getTargetException();\n+ if (targetException instanceof IOException) {\n+ throw (IOException) targetException;\n+ } else {\n+ throw new JDOMException(targetException.getMessage(), targetException);\n+ }\n+ } catch (Exception e) {\n+ throw new JDOMException("Reflection failed while parsing a document with JAXP", e); \n+ }\n+\n+ // Allow all exceptions to pass through\n+ }\n+\n+ /**\n+ * This creates an empty <code>Document</code> object based\n+ * on a specific parser implementation.\n+ *\n+ * @return <code>Document</code> - created DOM Document.\n+ * @throws JDOMException when errors occur in parsing.\n+ */\n+ public Document createDocument() \n+ throws JDOMException {\n+\n+ try {\n+ // We need DOM Level 2 and thus JAXP 1.1.\n+ // If JAXP 1.0 is all that\'s available then we error out.\n+ Class.forName("javax.xml.transform.Transformer");\n+\n+ // Try JAXP 1.1 calls to build the document\n+ Class factoryClass =\n+ Class.forName("javax.xml.parsers.DocumentBuilderFactory");\n+\n+ // factory = DocumentBuilderFactory.newInstance();\n+ Method newParserInstance =\n+ factoryClass.getMethod("newInstance", null);\n+ Object factory = newParserInstance.invoke(null, null);\n+\n+ // jaxpParser = factory.newDocumentBuilder();\n+ Method newDocBuilder =\n+ factoryClass.getMethod("newDocumentBuilder", null);\n+ Object jaxpParser = newDocBuilder.invoke(factory, null);\n+\n+ // domDoc = jaxpParser.newDocument();\n+ Class parserClass = jaxpParser.getClass();\n+ Method newDoc = parserClass.getMethod("newDocument", null);\n+ org.w3c.dom.Document domDoc =\n+ (org.w3c.dom.Document) newDoc.invoke(jaxpParser, null);\n+\n+ return domDoc;\n+ } catch (Exception e) {\n+ throw new JDOMException("Reflection failed while creating new JAXP document", e); \n+ }\n+\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/OracleV1DOMAdapter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/OracleV1DOMAdapter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,145 @@ +/*-- + + $Id: OracleV1DOMAdapter.java,v 1.20 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.adapters; + +import java.io.*; +import java.lang.reflect.*; + +import org.jdom.*; +import org.w3c.dom.Document; +import org.xml.sax.*; + +/** + * An adapter for the Oracle Version 1 DOM parser. + * + * @version $Revision: 1.20 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + * @author Jason Hunter + */ +public class OracleV1DOMAdapter extends AbstractDOMAdapter { + + private static final String CVS_ID = + "@(#) $RCSfile: OracleV1DOMAdapter.java,v $ $Revision: 1.20 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This creates a new <code>{@link Document}</code> from an + * existing <code>InputStream</code> by letting a DOM + * parser handle parsing using the supplied stream. + * + * @param in <code>InputStream</code> to parse. + * @param validate <code>boolean</code> to indicate if validation should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public Document getDocument(InputStream in, boolean validate) + throws IOException, JDOMException { + + try { + // Load the parser class + Class parserClass = Class.forName("oracle.xml.parser.XMLParser"); + Object parser = parserClass.newInstance(); + + // Parse the document + Method parse = + parserClass.getMethod("parse", + new Class[] {org.xml.sax.InputSource.class}); + parse.invoke(parser, new Object[] {new InputSource(in)}); + + // Get the Document object + Method getDocument = parserClass.getMethod("getDocument", null); + Document doc = (Document)getDocument.invoke(parser, null); + + return doc; + } catch (InvocationTargetException e) { + Throwable targetException = e.getTargetException(); + if (targetException instanceof org.xml.sax.SAXParseException) { + SAXParseException parseException = (SAXParseException) targetException; + throw new JDOMException("Error on line " + parseException.getLineNumber() + + " of XML document: " + parseException.getMessage(), parseException); + } else if (targetException instanceof IOException) { + IOException ioException = (IOException) targetException; + throw ioException; + } else { + throw new JDOMException(targetException.getMessage(), targetException); + } + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage(), e); + } + } + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation. + * + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public Document createDocument() throws JDOMException { + try { + return + (Document)Class.forName( + "oracle.xml.parser.XMLDocument") + .newInstance(); + + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage() + " when creating document", e); + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/OracleV2DOMAdapter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/OracleV2DOMAdapter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,145 @@ +/*-- + + $Id: OracleV2DOMAdapter.java,v 1.19 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.adapters; + +import java.io.*; +import java.lang.reflect.*; + +import org.jdom.*; +import org.w3c.dom.Document; +import org.xml.sax.*; + +/** + * An adapter for the Oracle Version 2 DOM parser. + * + * @version $Revision: 1.19 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + * @author Jason Hunter + */ +public class OracleV2DOMAdapter extends AbstractDOMAdapter { + + private static final String CVS_ID = + "@(#) $RCSfile: OracleV2DOMAdapter.java,v $ $Revision: 1.19 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This creates a new <code>{@link Document}</code> from an + * existing <code>InputStream</code> by letting a DOM + * parser handle parsing using the supplied stream. + * + * @param in <code>InputStream</code> to parse. + * @param validate <code>boolean</code> to indicate if validation should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public Document getDocument(InputStream in, boolean validate) + throws IOException, JDOMException { + + try { + // Load the parser class + Class parserClass = Class.forName("oracle.xml.parser.v2.DOMParser"); + Object parser = parserClass.newInstance(); + + // Parse the document + Method parse = + parserClass.getMethod("parse", + new Class[] {org.xml.sax.InputSource.class}); + parse.invoke(parser, new Object[] {new InputSource(in)}); + + // Get the Document object + Method getDocument = parserClass.getMethod("getDocument", null); + Document doc = (Document)getDocument.invoke(parser, null); + + return doc; + } catch (InvocationTargetException e) { + Throwable targetException = e.getTargetException(); + if (targetException instanceof org.xml.sax.SAXParseException) { + SAXParseException parseException = (SAXParseException)targetException; + throw new JDOMException("Error on line " + parseException.getLineNumber() + + " of XML document: " + parseException.getMessage(), parseException); + } else if (targetException instanceof IOException) { + IOException ioException = (IOException) targetException; + throw ioException; + } else { + throw new JDOMException(targetException.getMessage(), targetException); + } + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage(), e); + } + } + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation. + * + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public Document createDocument() throws JDOMException { + try { + return + (Document)Class.forName( + "oracle.xml.parser.v2.XMLDocument") + .newInstance(); + + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage() + " when creating document", e); + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/XML4JDOMAdapter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/XML4JDOMAdapter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,171 @@ +/*-- + + $Id: XML4JDOMAdapter.java,v 1.18 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.adapters; + +import java.io.*; +import java.lang.reflect.*; + +import org.jdom.*; +import org.jdom.input.*; +import org.w3c.dom.Document; +import org.xml.sax.*; + +/** + * An adapter for the IBM XML4J DOM parser. + * + * @version $Revision: 1.18 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + * @author Jason Hunter + */ +public class XML4JDOMAdapter extends AbstractDOMAdapter { + + private static final String CVS_ID = + "@(#) $RCSfile: XML4JDOMAdapter.java,v $ $Revision: 1.18 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This creates a new <code>{@link Document}</code> from an + * existing <code>InputStream</code> by letting a DOM + * parser handle parsing using the supplied stream. + * + * @param in <code>InputStream</code> to parse. + * @param validate <code>boolean</code> to indicate if validation should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public Document getDocument(InputStream in, boolean validate) + throws IOException, JDOMException { + + try { + /* + * IBM XML4J actually uses the Xerces parser, so this is + * all Xerces specific code. + */ + + // Load the parser class + Class parserClass = Class.forName("org.apache.xerces.parsers.DOMParser"); + Object parser = parserClass.newInstance(); + + // Set validation + Method setFeature = + parserClass.getMethod("setFeature", + new Class[] {java.lang.String.class, + boolean.class}); + setFeature.invoke(parser, new Object[] {"http://xml.org/sax/features/validation", + new Boolean(validate)}); + + // Set namespaces + setFeature.invoke(parser, new Object[] {"http://xml.org/sax/features/namespaces", + new Boolean(false)}); + + // Set the error handler + if (validate) { + Method setErrorHandler = + parserClass.getMethod("setErrorHandler", + new Class[] {ErrorHandler.class}); + setErrorHandler.invoke(parser, new Object[] {new BuilderErrorHandler()}); + } + + // Parse the document + Method parse = + parserClass.getMethod("parse", + new Class[] {org.xml.sax.InputSource.class}); + parse.invoke(parser, new Object[]{new InputSource(in)}); + + // Get the Document object + Method getDocument = parserClass.getMethod("getDocument", null); + Document doc = (Document)getDocument.invoke(parser, null); + + return doc; + } catch (InvocationTargetException e) { + Throwable targetException = e.getTargetException(); + if (targetException instanceof org.xml.sax.SAXParseException) { + SAXParseException parseException = (SAXParseException)targetException; + throw new JDOMException("Error on line " + parseException.getLineNumber() + + " of XML document: " + parseException.getMessage(), parseException); + } else if (targetException instanceof IOException) { + IOException ioException = (IOException) targetException; + throw ioException; + } else { + throw new JDOMException(targetException.getMessage(), targetException); + } + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage(), e); + } + } + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation. + * + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public Document createDocument() throws JDOMException { + try { + return + (Document)Class.forName( + "org.apache.xerces.dom.DocumentImpl") + .newInstance(); + + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage() + " while creating document", e); + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/XercesDOMAdapter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/XercesDOMAdapter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,170 @@ +/*-- + + $Id: XercesDOMAdapter.java,v 1.19 2007/11/10 05:28:59 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.adapters; + +import java.io.*; +import java.lang.reflect.*; + +import org.jdom.*; +import org.jdom.input.*; +import org.w3c.dom.Document; +import org.xml.sax.*; + +/** + * An adapter for the Apache Xerces DOM parser. + * + * @version $Revision: 1.19 $, $Date: 2007/11/10 05:28:59 $ + * @author Brett McLaughlin + * @author Jason Hunter + */ +public class XercesDOMAdapter extends AbstractDOMAdapter { + + private static final String CVS_ID = + "@(#) $RCSfile: XercesDOMAdapter.java,v $ $Revision: 1.19 $ $Date: 2007/11/10 05:28:59 $ $Name: jdom_1_1_1 $"; + + /** + * This creates a new <code>{@link Document}</code> from an + * existing <code>InputStream</code> by letting a DOM + * parser handle parsing using the supplied stream. + * + * @param in <code>InputStream</code> to parse. + * @param validate <code>boolean</code> to indicate if validation + * should occur. + * @return <code>Document</code> - instance ready for use. + * @throws IOException when I/O error occurs. + * @throws JDOMException when errors occur in parsing. + */ + public Document getDocument(InputStream in, boolean validate) + throws IOException, JDOMException { + + try { + // Load the parser class + Class parserClass = + Class.forName("org.apache.xerces.parsers.DOMParser"); + Object parser = parserClass.newInstance(); + + // Set validation + Method setFeature = parserClass.getMethod( + "setFeature", + new Class[] {java.lang.String.class, boolean.class}); + setFeature.invoke(parser, + new Object[] {"http://xml.org/sax/features/validation", + new Boolean(validate)}); + + // Set namespaces true + setFeature.invoke(parser, + new Object[] {"http://xml.org/sax/features/namespaces", + new Boolean(true)}); + + // Set the error handler + if (validate) { + Method setErrorHandler = parserClass.getMethod( + "setErrorHandler", + new Class[] {ErrorHandler.class}); + setErrorHandler.invoke(parser, + new Object[] {new BuilderErrorHandler()}); + } + + // Parse the document + Method parse = parserClass.getMethod( + "parse", + new Class[] {org.xml.sax.InputSource.class}); + parse.invoke(parser, new Object[]{new InputSource(in)}); + + // Get the Document object + Method getDocument = parserClass.getMethod("getDocument", null); + Document doc = (Document)getDocument.invoke(parser, null); + + return doc; + } catch (InvocationTargetException e) { + Throwable targetException = e.getTargetException(); + if (targetException instanceof org.xml.sax.SAXParseException) { + SAXParseException parseException = + (SAXParseException)targetException; + throw new JDOMException("Error on line " + + parseException.getLineNumber() + + " of XML document: " + + parseException.getMessage(), e); + } else if (targetException instanceof IOException) { + IOException ioException = (IOException) targetException; + throw ioException; + } else { + throw new JDOMException(targetException.getMessage(), e); + } + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage(), e); + } + } + + /** + * This creates an empty <code>Document</code> object based + * on a specific parser implementation. + * + * @return <code>Document</code> - created DOM Document. + * @throws JDOMException when errors occur. + */ + public Document createDocument() throws JDOMException { + try { + return (Document)Class.forName( + "org.apache.xerces.dom.DocumentImpl").newInstance(); + } catch (Exception e) { + throw new JDOMException(e.getClass().getName() + ": " + + e.getMessage() + " when creating document", e); + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/adapters/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/adapters/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,7 @@ +<body> + +Classes to interface with various DOM implementations. Not generally +needed except in truly advanced situations. JAXPDOMAdapter is most commonly +used. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/filter/AbstractFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/filter/AbstractFilter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,82 @@ +/*-- + + $Id: AbstractFilter.java,v 1.6 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.filter; + +/** + * Partial implementation of {@link Filter}. + * + * @author Bradley S. Huffman + * @version $Revision: 1.6 $, $Date: 2007/11/10 05:29:00 $ + */ +public abstract class AbstractFilter implements Filter { + + private static final String CVS_ID = + "@(#) $RCSfile: AbstractFilter.java,v $ $Revision: 1.6 $ $Date: 2007/11/10 05:29:00 $"; + + public Filter negate() { + return new NegateFilter(this); + } + + public Filter or(Filter filter) { + return new OrFilter(this, filter); + } + + public Filter and(Filter filter) { + return new AndFilter(this, filter); + } + +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/filter/AndFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/filter/AndFilter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,125 @@ +/*-- + + $Id: AndFilter.java,v 1.4 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.filter; + +/** + * Allow two filters to be chained together with a logical + * <b>and</b> operation. + * + * @author Bradley S. Huffman + * @version $Revision: 1.4 $, $Date: 2007/11/10 05:29:00 $ + */ +final class AndFilter extends AbstractFilter { + + private static final String CVS_ID = + "@(#) $RCSfile: AndFilter.java,v $ $Revision: 1.4 $ $Date: 2007/11/10 05:29:00 $"; + + // Filter for left side of logical <b>and</b>. + private Filter left; + + // Filter for right side of logical <b>and</b>. + private Filter right; + + /** + * Match if only both supplied filters match. + * + * @param left left side of logical <b>and</b> + * @param right right side of logical <b>and</b> + * @throws IllegalArgumentException if either supplied filter is null + */ + public AndFilter(Filter left, Filter right) { + if ((left == null) || (right == null)) { + throw new IllegalArgumentException("null filter not allowed"); + } + this.left = left; + this.right = right; + } + + public boolean matches(Object obj) { + return left.matches(obj) && right.matches(obj); + } + + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (obj instanceof AndFilter) { + AndFilter filter = (AndFilter) obj; + if ((left.equals(filter.left) && right.equals(filter.right)) || + (left.equals(filter.right) && right.equals(filter.left))) { + return true; + } + } + return false; + } + + public int hashCode() { + return (31 * left.hashCode()) + right.hashCode(); + } + + public String toString() { + return new StringBuffer(64) + .append("[AndFilter: ") + .append(left.toString()) + .append(",\n") + .append(" ") + .append(right.toString()) + .append("]") + .toString(); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/filter/ContentFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/filter/ContentFilter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,356 @@\n+/*--\n+\n+ $Id: ContentFilter.java,v 1.15 2007/11/10 05:29:00 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.filter;\n+\n+import org.jdom.*;\n+\n+/**\n+ * A general purpose Filter able to represent all legal JDOM objects or a\n+ * specific subset. Filtering is accomplished by way of a filtering mask in\n+ * which each bit represents whether a JDOM object is visible or not.\n+ * For example to view all Text and CDATA nodes in the content of element x.\n+ * <pre><code>\n+ * Filter filter = new ContentFilter(ContentFilter.TEXT |\n+ * ContentFilter.CDATA);\n+ * List content = x.getContent(filter);\n+ * </code></pre>\n+ * <p>\n+ * For those who don\'t like bit-masking, set methods are provided as an\n+ * alternative. For example to allow everything except Comment nodes.\n+ * <pre><code>\n+ * Filter filter = new ContentFilter();\n+ * filter.setCommentVisible(false);\n+ * List content = x.getContent(filter);\n+ * </code></pre>\n+ * <p>\n+ * The default is to allow all valid JDOM objects.\n+ *\n+ * @version $Revision: 1.15 $, $Date: 2007/11/10 05:29:00 $\n+ * @author Bradley S. Huffman\n+ */\n+public class ContentFilter extends AbstractFilter {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: ContentFilter.java,v $ $Revision: 1.15 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1_1 $";\n+\n+ /** Mask for JDOM {@link Element} objects */\n+ public static final int ELEMENT = 1;\n+\n+ /** M'..b'ask |= CDATA;\n+ }\n+ else {\n+ filterMask &= ~CDATA;\n+ }\n+ }\n+\n+ /**\n+ * Set visiblity of <code>Text</code> objects.\n+ *\n+ * @param visible whether Text nodes are visible, <code>true</code>\n+ * if yes, <code>false</code> if not\n+ */\n+ public void setTextVisible(boolean visible) {\n+ if (visible) {\n+ filterMask |= TEXT;\n+ }\n+ else {\n+ filterMask &= ~TEXT;\n+ }\n+ }\n+\n+ /**\n+ * Set visiblity of <code>Comment</code> objects.\n+ *\n+ * @param visible whether Comments are visible, <code>true</code>\n+ * if yes, <code>false</code> if not\n+ */\n+ public void setCommentVisible(boolean visible) {\n+ if (visible) {\n+ filterMask |= COMMENT;\n+ }\n+ else {\n+ filterMask &= ~COMMENT;\n+ }\n+ }\n+\n+ /**\n+ * Set visiblity of <code>ProcessingInstruction</code> objects.\n+ *\n+ * @param visible whether ProcessingInstructions are visible,\n+ * <code>true</code> if yes, <code>false</code> if not\n+ */\n+ public void setPIVisible(boolean visible) {\n+ if (visible) {\n+ filterMask |= PI;\n+ }\n+ else {\n+ filterMask &= ~PI;\n+ }\n+ }\n+\n+ /**\n+ * Set visiblity of <code>EntityRef</code> objects.\n+ *\n+ * @param visible whether EntityRefs are visible, <code>true</code>\n+ * if yes, <code>false</code> if not\n+ */\n+ public void setEntityRefVisible(boolean visible) {\n+ if (visible) {\n+ filterMask |= ENTITYREF;\n+ }\n+ else {\n+ filterMask &= ~ENTITYREF;\n+ }\n+ }\n+\n+ /**\n+ * Set visiblity of <code>DocType</code> objects.\n+ *\n+ * @param visible whether the DocType is visible, <code>true</code>\n+ * if yes, <code>false</code> if not\n+ */\n+ public void setDocTypeVisible(boolean visible) {\n+ if (visible) {\n+ filterMask |= DOCTYPE;\n+ }\n+ else {\n+ filterMask &= ~DOCTYPE;\n+ }\n+ }\n+\n+ /**\n+ * Check to see if the object matches according to the filter mask.\n+ *\n+ * @param obj The object to verify.\n+ * @return <code>true</code> if the objected matched a predfined\n+ * set of rules.\n+ */\n+ public boolean matches(Object obj) {\n+ if (obj instanceof Element) {\n+ return (filterMask & ELEMENT) != 0;\n+ }\n+ else if (obj instanceof CDATA) { // must come before Text check\n+ return (filterMask & CDATA) != 0;\n+ }\n+ else if (obj instanceof Text) {\n+ return (filterMask & TEXT) != 0;\n+ }\n+ else if (obj instanceof Comment) {\n+ return (filterMask & COMMENT) != 0;\n+ }\n+ else if (obj instanceof ProcessingInstruction) {\n+ return (filterMask & PI) != 0;\n+ }\n+ else if (obj instanceof EntityRef) {\n+ return (filterMask & ENTITYREF) != 0;\n+ }\n+ else if (obj instanceof Document) {\n+ return (filterMask & DOCUMENT) != 0;\n+ }\n+ else if (obj instanceof DocType) {\n+ return (filterMask & DOCTYPE) != 0;\n+ }\n+\n+ return false;\n+ }\n+\n+ /**\n+ * Returns whether the two filters are equivalent (i.e. the\n+ * matching mask values are identical).\n+ *\n+ * @param obj the object to compare against\n+ * @return whether the two filters are equal\n+ */\n+ public boolean equals(Object obj) {\n+ // Generated by IntelliJ\n+ if (this == obj) return true;\n+ if (!(obj instanceof ContentFilter)) return false;\n+\n+ final ContentFilter filter = (ContentFilter) obj;\n+\n+ if (filterMask != filter.filterMask) return false;\n+\n+ return true;\n+ }\n+\n+ public int hashCode() {\n+ // Generated by IntelliJ\n+ return filterMask;\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/filter/ElementFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/filter/ElementFilter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,189 @@ +/*-- + + $Id: ElementFilter.java,v 1.20 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.filter; + +import java.io.*; +import org.jdom.*; + +/** + * A Filter that only matches {@link org.jdom.Element} objects. + * + * @version $Revision: 1.20 $, $Date: 2007/11/10 05:29:00 $ + * @author Jools Enticknap + * @author Bradley S. Huffman + */ +public class ElementFilter extends AbstractFilter { + + private static final String CVS_ID = + "@(#) $RCSfile: ElementFilter.java,v $ $Revision: 1.20 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1_1 $"; + + /** The element name */ + private String name; + + /** The element namespace */ + private transient Namespace namespace; + + /** + * Select only the Elements. + */ + public ElementFilter() {} + + /** + * Select only the Elements with the supplied name in any Namespace. + * + * @param name The name of the Element. + */ + public ElementFilter(String name) { + this.name = name; + } + + /** + * Select only the Elements with the supplied Namespace. + * + * @param namespace The namespace the Element lives in. + */ + public ElementFilter(Namespace namespace) { + this.namespace = namespace; + } + + /** + * Select only the Elements with the supplied name and Namespace. + * + * @param name The name of the Element. + * @param namespace The namespace the Element lives in. + */ + public ElementFilter(String name, Namespace namespace) { + this.name = name; + this.namespace = namespace; + } + + /** + * Check to see if the object matches a predefined set of rules. + * + * @param obj The object to verify. + * @return <code>true</code> if the objected matched a predfined + * set of rules. + */ + public boolean matches(Object obj) { + if (obj instanceof Element) { + Element el = (Element) obj; + return + (this.name == null || this.name.equals(el.getName())) && + (this.namespace == null || this.namespace.equals(el.getNamespace())); + } + return false; + } + + /** + * Returns whether the two filters are equivalent (i.e. the + * matching names and namespace are equivalent). + * + * @param obj the object to compare against + * @return whether the two filters are equal + */ + public boolean equals(Object obj) { + // Generated by IntelliJ + if (this == obj) return true; + if (!(obj instanceof ElementFilter)) return false; + + final ElementFilter filter = (ElementFilter) obj; + + if (name != null ? !name.equals(filter.name) : filter.name != null) return false; + if (namespace != null ? !namespace.equals(filter.namespace) : filter.namespace != null) return false; + + return true; + } + + public int hashCode() { + // Generated by IntelliJ + int result; + result = (name != null ? name.hashCode() : 0); + result = 29 * result + (namespace != null ? namespace.hashCode() : 0); + return result; + } + + // Support a custom Namespace serialization so no two namespace + // object instances may exist for the same prefix/uri pair + private void writeObject(ObjectOutputStream out) throws IOException { + + out.defaultWriteObject(); + + // We use writeObject() and not writeUTF() to minimize space + // This allows for writing pointers to already written strings + if (namespace != null) { + out.writeObject(namespace.getPrefix()); + out.writeObject(namespace.getURI()); + } + else { + out.writeObject(null); + out.writeObject(null); + } + } + + private void readObject(ObjectInputStream in) + throws IOException, ClassNotFoundException { + + in.defaultReadObject(); + + Object prefix = in.readObject(); + Object uri = in.readObject(); + + if (prefix != null) { // else leave namespace null here + namespace = Namespace.getNamespace((String) prefix, (String) uri); + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/filter/Filter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/filter/Filter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,76 @@ +/*-- + + $Id: Filter.java,v 1.10 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.filter; + + +/** + * A generalized filter to restrict visibility or mutability on a list. + * + * @version $Revision: 1.10 $, $Date: 2007/11/10 05:29:00 $ + * @author Jools Enticknap + * @author Bradley S. Huffman + */ +public interface Filter extends java.io.Serializable { + /** + * Check to see if the object matches a predefined set of rules. + * + * @param obj The object to verify. + * @return <code>true</code> if the object matches a predfined + * set of rules. + */ + public boolean matches(Object obj); +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/filter/NegateFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/filter/NegateFilter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,113 @@ +/*-- + + $Id: NegateFilter.java,v 1.4 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.filter; + +/** + * Filter that is the logical <b>negation</b> operation of another filter. + * + * + * @author Bradley S. Huffman + * @version $Revision: 1.4 $, $Date: 2007/11/10 05:29:00 $ + */ +final class NegateFilter extends AbstractFilter { + + private static final String CVS_ID = + "@(#) $RCSfile: NegateFilter.java,v $ $Revision: 1.4 $ $Date: 2007/11/10 05:29:00 $"; + + // Underlying filter. + private Filter filter; + + /** + * Match if the supplied filter <b>does not</b> match. + * + * @param filter filter to use. + */ + public NegateFilter(Filter filter) { + this.filter = filter; + } + + public boolean matches(Object obj) { + return !filter.matches(obj); + } + + public Filter negate() { + return filter; + } + + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (obj instanceof NegateFilter) { + return filter.equals(((NegateFilter) obj).filter); + } + return false; + } + + public int hashCode() { + return ~filter.hashCode(); + } + + public String toString() { + return new StringBuffer(64) + .append("[NegateFilter: ") + .append(filter.toString()) + .append("]") + .toString(); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/filter/OrFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/filter/OrFilter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,125 @@ +/*-- + + $Id: OrFilter.java,v 1.5 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.filter; + +/** + * Allow two filters to be chained together with a logical + * <b>or</b> operation. + * + * @author Bradley S. Huffman + * @version $Revision: 1.5 $, $Date: 2007/11/10 05:29:00 $ + */ +final class OrFilter extends AbstractFilter { + + private static final String CVS_ID = + "@(#) $RCSfile: OrFilter.java,v $ $Revision: 1.5 $ $Date: 2007/11/10 05:29:00 $"; + + /** Filter for left side of logical <b>or</b> */ + private Filter left; + + /** Filter for right side of logical <b>or</b> */ + private Filter right; + + /** + * Match if either of the supplied filters. + * + * @param left left side of logical <b>or</b> + * @param right right side of logical <b>or</b> + * @throws IllegalArgumentException if either supplied filter is null + */ + public OrFilter(Filter left, Filter right) { + if ((left == null) || (right == null)) { + throw new IllegalArgumentException("null filter not allowed"); + } + this.left = left; + this.right = right; + } + + public boolean matches(Object obj) { + return left.matches(obj) || right.matches(obj); + } + + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (obj instanceof OrFilter) { + OrFilter filter = (OrFilter) obj; + if ((left.equals(filter.left) && right.equals(filter.right)) || + (left.equals(filter.right) && right.equals(filter.left))) { + return true; + } + } + return false; + } + + public int hashCode() { + return (31 * left.hashCode()) + right.hashCode(); + } + + public String toString() { + return new StringBuffer(64) + .append("[OrFilter: ") + .append(left.toString()) + .append(",\n") + .append(" ") + .append(right.toString()) + .append("]") + .toString(); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/filter/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/filter/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,9 @@ +<body> + +Classes to programmatically filter nodes of a document based on type, name, +value, or other aspects and to boolean and/or/negate these rules. Filters can +be used in methods like getContent(Filter) and getDescendants(Filter). A +sampling of generally useful filters are provided here. Alternate filters can +be user defined. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/input/BuilderErrorHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/input/BuilderErrorHandler.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,111 @@ +/*-- + + $Id: BuilderErrorHandler.java,v 1.13 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.input; + +import org.xml.sax.*; + +/** + * The standard JDOM error handler implementation. + * + * @author Jason Hunter + * @version $Revision: 1.13 $, $Date: 2007/11/10 05:29:00 $ + */ + +public class BuilderErrorHandler implements ErrorHandler { + + private static final String CVS_ID = + "@(#) $RCSfile: BuilderErrorHandler.java,v $ $Revision: 1.13 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1_1 $"; + + /** + * This method is called when a warning has occurred; this indicates + * that while no XML rules were broken, something appears to be + * incorrect or missing. + * The implementation of this method here is a "no op". + * + * @param exception <code>SAXParseException</code> that occurred. + * @throws SAXException when things go wrong + */ + public void warning(SAXParseException exception) throws SAXException { + // nothing + } + + /** + * This method is called in response to an error that has occurred; + * this indicates that a rule was broken, typically in validation, but + * that parsing could reasonably continue. + * The implementation of this method here is to rethrow the exception. + * + * @param exception <code>SAXParseException</code> that occurred. + * @throws SAXException when things go wrong + */ + public void error(SAXParseException exception) throws SAXException { + throw exception; + } + + /** + * This method is called in response to a fatal error; this indicates that + * a rule has been broken that makes continued parsing either impossible + * or an almost certain waste of time. + * The implementation of this method here is to rethrow the exception. + * + * @param exception <code>SAXParseException</code> that occurred. + * @throws SAXException when things go wrong + */ + public void fatalError(SAXParseException exception) throws SAXException { + throw exception; + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/input/DOMBuilder.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/input/DOMBuilder.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,341 @@\n+/*--\n+\n+ $Id: DOMBuilder.java,v 1.60 2007/11/10 05:29:00 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.input;\n+\n+import org.jdom.*;\n+import org.jdom.Document;\n+import org.jdom.Element;\n+import org.w3c.dom.*;\n+\n+/**\n+ * Builds a JDOM {@link org.jdom.Document org.jdom.Document} from a pre-existing\n+ * DOM {@link org.w3c.dom.Document org.w3c.dom.Document}. Also handy for testing\n+ * builds from files to sanity check {@link SAXBuilder}.\n+ *\n+ * @version $Revision: 1.60 $, $Date: 2007/11/10 05:29:00 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Philip Nelson\n+ * @author Kevin Regan\n+ * @author Yusuf Goolamabbas\n+ * @author Dan Schaffer\n+ * @author Bradley S. Huffman\n+ */\n+public class DOMBuilder {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: DOMBuilder.java,v $ $Revision: 1.60 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1_1 $";\n+\n+ /** Adapter class to use */\n+ private String adapterClass;\n+\n+ /** The factory for creating new JDOM objects */\n+ private JDOMFactory factory = new DefaultJDOMFactory();\n+\n+ /**\n+ * This creates a new DOMBuilder which will attempt to first locate\n+ * a parser via JAXP, then will try to use a set of default parsers.\n+ * The underlying parser will not validate.\n+ */\n+ public DOMBuilder() {\n+ }\n+\n+ /**\n+ * This creates a new DOMBuilder using the specified DOMAdapter\n+ * implementation as a way to choose the underly'..b'r att = (Attr) attributeList.item(i);\n+\n+ String attname = att.getName();\n+\n+ if ( !attname.startsWith("xmlns")) {\n+ String attPrefix = "";\n+ String attLocalName = attname;\n+ colon = attname.indexOf(\':\');\n+ if (colon >= 0) {\n+ attPrefix = attname.substring(0, colon);\n+ attLocalName = attname.substring(colon + 1);\n+ }\n+\n+ String attvalue = att.getValue();\n+\n+ // Get attribute\'s namespace\n+ Namespace attns = null;\n+ if ("".equals(attPrefix)) {\n+ attns = Namespace.NO_NAMESPACE;\n+ }\n+ else {\n+ attns = element.getNamespace(attPrefix);\n+ }\n+\n+ Attribute attribute =\n+ factory.attribute(attLocalName, attvalue, attns);\n+ factory.setAttribute(element, attribute);\n+ }\n+ }\n+\n+ // Recurse on child nodes\n+ // The list should never be null nor should it ever contain\n+ // null nodes, but some DOM impls are broken\n+ NodeList children = node.getChildNodes();\n+ if (children != null) {\n+ int size = children.getLength();\n+ for (int i = 0; i < size; i++) {\n+ Node item = children.item(i);\n+ if (item != null) {\n+ buildTree(item, doc, element, false);\n+ }\n+ }\n+ }\n+ break;\n+\n+ case Node.TEXT_NODE:\n+ String data = node.getNodeValue();\n+ factory.addContent(current, factory.text(data));\n+ break;\n+\n+ case Node.CDATA_SECTION_NODE:\n+ String cdata = node.getNodeValue();\n+ factory.addContent(current, factory.cdata(cdata));\n+ break;\n+\n+\n+ case Node.PROCESSING_INSTRUCTION_NODE:\n+ if (atRoot) {\n+ factory.addContent(doc,\n+ factory.processingInstruction(node.getNodeName(),\n+ node.getNodeValue()));\n+ } else {\n+ factory.addContent(current,\n+ factory.processingInstruction(node.getNodeName(),\n+ node.getNodeValue()));\n+ }\n+ break;\n+\n+ case Node.COMMENT_NODE:\n+ if (atRoot) {\n+ factory.addContent(doc, factory.comment(node.getNodeValue()));\n+ } else {\n+ factory.addContent(current, factory.comment(node.getNodeValue()));\n+ }\n+ break;\n+\n+ case Node.ENTITY_REFERENCE_NODE:\n+ EntityRef entity = factory.entityRef(node.getNodeName());\n+ factory.addContent(current, entity);\n+ break;\n+\n+ case Node.ENTITY_NODE:\n+ // ??\n+ break;\n+\n+ case Node.DOCUMENT_TYPE_NODE:\n+ DocumentType domDocType = (DocumentType)node;\n+ String publicID = domDocType.getPublicId();\n+ String systemID = domDocType.getSystemId();\n+ String internalDTD = domDocType.getInternalSubset();\n+\n+ DocType docType = factory.docType(domDocType.getName());\n+ docType.setPublicID(publicID);\n+ docType.setSystemID(systemID);\n+ docType.setInternalSubset(internalDTD);\n+\n+ factory.addContent(doc, docType);\n+ break;\n+ }\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/input/JAXPParserFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/input/JAXPParserFactory.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,179 @@ +/*-- + + $Id: JAXPParserFactory.java,v 1.6 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.input; + +import java.util.*; + +import javax.xml.parsers.*; + +import org.jdom.*; +import org.xml.sax.*; + +/** + * A non-public utility class to allocate JAXP SAX parsers. + * + * @version $Revision: 1.6 $, $Date: 2007/11/10 05:29:00 $ + * @author Laurent Bihanic + */ +class JAXPParserFactory { // package protected + + private static final String CVS_ID = + "@(#) $RCSfile: JAXPParserFactory.java,v $ $Revision: 1.6 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1_1 $"; + + /** JAXP 1.2 schema language property id. */ + private static final String JAXP_SCHEMA_LANGUAGE_PROPERTY = + "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; + + /** JAXP 1.2 schema location property id. */ + private static final String JAXP_SCHEMA_LOCATION_PROPERTY = + "http://java.sun.com/xml/jaxp/properties/schemaSource"; + + /** + * Private constructor to forbid allocating instances of this utility + * class. + */ + private JAXPParserFactory() { + // Never called. + } + + /* Implementor's note regarding createParser() design: The features and + properties are normally set in SAXBuilder, but we take them in + createParser() as well because some features or properties may need to be + applied during the JAXP parser construction. Today, for example, properties + is used as it's the only way to configure schema validation: JAXP defines + schema validation properties but SAX does not. This reflects in the Apache + Xerces implementation where the SAXParser implementation supports the JAXP + properties but the XMLReader does not. Hence, configuring schema validation + must be done on the SAXParser object which is only visible in + JAXParserFactory. Features is also passed in case some future JAXP release + defines JAXP-specific features. + */ + + /** + * Creates a SAX parser allocated through the configured JAXP SAX + * parser factory. + * + * @param validating whether a validating parser is requested. + * @param features the user-defined SAX features. + * @param properties the user-defined SAX properties. + * + * @return a configured XMLReader. + * + * @throws JDOMException if any error occurred when allocating or + * configuring the JAXP SAX parser. + */ + public static XMLReader createParser(boolean validating, + Map features, Map properties) throws JDOMException { + try { + SAXParser parser = null; + + // Allocate and configure JAXP SAX parser factory. + SAXParserFactory factory = SAXParserFactory.newInstance(); + factory.setValidating(validating); + factory.setNamespaceAware(true); + + try { + // Allocate parser. + parser = factory.newSAXParser(); + } + catch (ParserConfigurationException e) { + throw new JDOMException("Could not allocate JAXP SAX Parser", e); + } + + // Set user-defined JAXP properties (if any) + setProperty(parser, properties, JAXP_SCHEMA_LANGUAGE_PROPERTY); + setProperty(parser, properties, JAXP_SCHEMA_LOCATION_PROPERTY); + + // Return configured SAX XMLReader. + return parser.getXMLReader(); + } + catch (SAXException e) { + throw new JDOMException("Could not allocate JAXP SAX Parser", e); + } + } + + /** + * Sets a property on a JAXP SAX parser object if and only if it + * is declared in the user-defined properties. + * + * @param parser the JAXP SAX parser to configure. + * @param properties the user-defined SAX properties. + * @param name the name of the property to set. + * + * @throws JDOMException if any error occurred while configuring + * the property. + */ + private static void setProperty(SAXParser parser, + Map properties, String name) throws JDOMException { + try { + if (properties.containsKey(name)) { + parser.setProperty(name, properties.get(name)); + } + } + catch (SAXNotSupportedException e) { + throw new JDOMException( + name + " property not supported for JAXP parser " + + parser.getClass().getName()); + } + catch (SAXNotRecognizedException e) { + throw new JDOMException( + name + " property not recognized for JAXP parser " + + parser.getClass().getName()); + } + } +} + |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/input/JDOMParseException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/input/JDOMParseException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,175 @@ +/*-- + + $Id: JDOMParseException.java,v 1.8 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.input; + +import org.jdom.*; +import org.xml.sax.*; + +/** + * Thrown during parse errors, with information about where the parse error + * occurred as well as access to the partially built document. + * + * @version $Revision: 1.8 $, $Date: 2007/11/10 05:29:00 $ + * @author Laurent Bihanic + */ +public class JDOMParseException extends JDOMException { + + private static final String CVS_ID = + "@(#) $RCSfile: JDOMParseException.java,v $ $Revision: 1.8 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1_1 $"; + + /** + * The portion of the document that was successfully built before + * the parse error occurred. + */ + private final Document partialDocument; + + /** + * This will create a parse <code>Exception</code> with the given + * message and wrap the <code>Exception</code> that cause a document + * parse to fail. + * + * @param message <code>String</code> message indicating + * the problem that occurred. + * @param cause <code>Throwable</code> that caused this + * to be thrown. + */ + public JDOMParseException(String message, Throwable cause) { + this(message, cause, null); + } + + /** + * This will create a parse <code>Exception</code> with the given + * message and the partial document and wrap the + * <code>Exception</code> that cause a document parse to fail. + * + * @param message <code>String</code> message indicating + * the problem that occurred. + * @param cause <code>Throwable</code> that caused this + * to be thrown. + * @param partialDocument <code>Document</code> the portion of + * the input XML document that was + * successfully built. + */ + public JDOMParseException(String message, Throwable cause, + Document partialDocument) { + super(message, cause); + this.partialDocument = partialDocument; + } + + /** + * Returns the partial document that was successfully built before + * the error occurred. + * + * @return the partial document or null if none. + */ + public Document getPartialDocument() { + return partialDocument; + } + + /** + * Returns the public identifier of the entity where the + * parse error occurred. + * + * @return a string containing the public identifier, or + * <code>null</code> if the information is not available. + */ + public String getPublicId() { + return (getCause() instanceof SAXParseException)? + ((SAXParseException)getCause()).getPublicId(): null; + } + + /** + * Returns the system identifier of the entity where the + * parse error occurred. + * + * @return a string containing the system identifier, or + * <code>null</code> if the information is not available. + */ + public String getSystemId() { + return (getCause() instanceof SAXParseException)? + ((SAXParseException)getCause()).getSystemId(): null; + } + + /** + * Returns the line number of the end of the text where the + * parse error occurred. + * <p> + * The first line in the document is line 1.</p> + * + * @return an integer representing the line number, or -1 + * if the information is not available. + */ + public int getLineNumber() { + return (getCause() instanceof SAXParseException)? + ((SAXParseException)getCause()).getLineNumber(): -1; + } + + /** + * Returns the column number of the end of the text where the + * parse error occurred. + * <p> + * The first column in a line is position 1.</p> + * + * @return an integer representing the column number, or -1 + * if the information is not available. + */ + public int getColumnNumber() { + return (getCause() instanceof SAXParseException)? + ((SAXParseException)getCause()).getColumnNumber(): -1; + } +} + |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/input/SAXBuilder.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/input/SAXBuilder.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,1105 @@\n+/*--\n+\n+ $Id: SAXBuilder.java,v 1.93 2009/07/23 06:26:26 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.input;\n+\n+import java.io.*;\n+import java.lang.reflect.*;\n+import java.net.*;\n+import java.util.*;\n+\n+import org.jdom.*;\n+\n+import org.xml.sax.*;\n+import org.xml.sax.helpers.XMLReaderFactory;\n+\n+/**\n+ * Builds a JDOM document from files, streams, readers, URLs, or a SAX {@link\n+ * org.xml.sax.InputSource} instance using a SAX parser. The builder uses a\n+ * third-party SAX parser (chosen by JAXP by default, or you can choose\n+ * manually) to handle the parsing duties and simply listens to the SAX events\n+ * to construct a document. Details which SAX does not provide, such as\n+ * whitespace outside the root element, are not represented in the JDOM\n+ * document. Information about SAX can be found at <a\n+ * href="http://www.saxproject.org">http://www.saxproject.org</a>.\n+ * <p>\n+ * Known issues: Relative paths for a {@link DocType} or {@link EntityRef} may\n+ * be converted by the SAX parser into absolute paths.\n+ *\n+ * @version $Revision: 1.93 $, $Date: 2009/07/23 06:26:26 $\n+ * @author Jason Hunter\n+ * @author Brett McLaughlin\n+ * @author Dan Schaffer\n+ * @author Philip Nelson\n+ * @author Alex Rosen\n+ */\n+public class SAXBuilder {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: SAXBuilder.java,v $ $Revision: 1.93 $ $Date: 2009/07/23 06:26:26 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * Default parser class to use'..b'1.2 method, reimplemented\n+// * here to work with JDK 1.1.\n+// *\n+// * @see java.io.File\n+// *\n+// * @param f the file to convert\n+// * @return the file path converted to a file: URL\n+// */\n+// protected URL fileToURL(File f) throws MalformedURLException {\n+// String path = f.getAbsolutePath();\n+// if (File.separatorChar != \'/\') {\n+// path = path.replace(File.separatorChar, \'/\');\n+// }\n+// if (!path.startsWith("/")) {\n+// path = "/" + path;\n+// }\n+// if (!path.endsWith("/") && f.isDirectory()) {\n+// path = path + "/";\n+// }\n+// return new URL("file", "", path);\n+// }\n+\n+ /** Custom File.toUrl() implementation to handle special chars in file names\n+ *\n+ * @param file file object whose path will be converted\n+ * @return URL form of the file, with special characters handled\n+ * @throws MalformedURLException if there\'s a problem constructing a URL\n+ */\n+ private static URL fileToURL(File file) throws MalformedURLException {\n+ StringBuffer buffer = new StringBuffer();\n+ String path = file.getAbsolutePath();\n+\n+ // Convert non-URL style file separators\n+ if (File.separatorChar != \'/\') {\n+ path = path.replace(File.separatorChar, \'/\');\n+ }\n+\n+ // Make sure it starts at root\n+ if (!path.startsWith("/")) {\n+ buffer.append(\'/\');\n+ }\n+\n+ // Copy, converting URL special characters as we go\n+ int len = path.length();\n+ for (int i = 0; i < len; i++) {\n+ char c = path.charAt(i);\n+ if (c == \' \')\n+ buffer.append("%20");\n+ else if (c == \'#\')\n+ buffer.append("%23");\n+ else if (c == \'%\')\n+ buffer.append("%25");\n+ else if (c == \'&\')\n+ buffer.append("%26");\n+ else if (c == \';\')\n+ buffer.append("%3B");\n+ else if (c == \'<\')\n+ buffer.append("%3C");\n+ else if (c == \'=\')\n+ buffer.append("%3D");\n+ else if (c == \'>\')\n+ buffer.append("%3E");\n+ else if (c == \'?\')\n+ buffer.append("%3F");\n+ else if (c == \'~\')\n+ buffer.append("%7E");\n+ else\n+ buffer.append(c);\n+ }\n+\n+ // Make sure directories end with slash\n+ if (!path.endsWith("/") && file.isDirectory()) {\n+ buffer.append(\'/\');\n+ }\n+\n+ // Return URL\n+ return new URL("file", "", buffer.toString());\n+ }\n+\n+ /**\n+ * Returns whether or not entities are being expanded into normal text\n+ * content.\n+ *\n+ * @return whether entities are being expanded\n+ */\n+ public boolean getExpandEntities() {\n+ return expand;\n+ }\n+\n+ /**\n+ * <p>\n+ * This sets whether or not to expand entities for the builder.\n+ * A true means to expand entities as normal content. A false means to\n+ * leave entities unexpanded as <code>EntityRef</code> objects. The\n+ * default is true.\n+ * </p>\n+ * <p>\n+ * When this setting is false, the internal DTD subset is retained; when\n+ * this setting is true, the internal DTD subset is not retained.\n+ * </p>\n+ * <p>\n+ * Note that Xerces (at least up to 1.4.4) has a bug where entities\n+ * in attribute values will be misreported if this flag is turned off,\n+ * resulting in entities to appear within element content. When turning\n+ * entity expansion off either avoid entities in attribute values, or\n+ * use another parser like Crimson.\n+ * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6111\n+ * </p>\n+ *\n+ * @param expand <code>boolean</code> indicating whether entity expansion\n+ * should occur.\n+ */\n+ public void setExpandEntities(boolean expand) {\n+ this.expand = expand;\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/input/SAXHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/input/SAXHandler.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,1018 @@\n+/*--\n+\n+ $Id: SAXHandler.java,v 1.73 2007/11/10 05:29:00 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.input;\n+\n+import java.util.*;\n+\n+import org.jdom.*;\n+import org.xml.sax.*;\n+import org.xml.sax.ext.*;\n+import org.xml.sax.helpers.*;\n+\n+/**\n+ * A support class for {@link SAXBuilder}.\n+ *\n+ * @version $Revision: 1.73 $, $Date: 2007/11/10 05:29:00 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Philip Nelson\n+ * @author Bradley S. Huffman\n+ * @author phil@triloggroup.com\n+ */\n+public class SAXHandler extends DefaultHandler implements LexicalHandler,\n+ DeclHandler,\n+ DTDHandler {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: SAXHandler.java,v $ $Revision: 1.73 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1_1 $";\n+\n+ /** Hash table to map SAX attribute type names to JDOM attribute types. */\n+ private static final Map attrNameToTypeMap = new HashMap(13);\n+\n+ /** <code>Document</code> object being built */\n+ private Document document;\n+\n+ /** <code>Element</code> object being built */\n+ private Element currentElement;\n+\n+ /** Indicator of where in the document we are */\n+ private boolean atRoot;\n+\n+ /** Indicator of whether we are in the DocType. Note that the DTD consists\n+ * of both the internal subset (inside the <!DOCTYPE> tag) and the\n+ *'..b' Handler for unparsed entity declarations in the DTD\n+ *\n+ * @param name <code>String</code> of the unparsed entity decl\n+ * @param publicID <code>String</code> of the unparsed entity decl\n+ * @param systemID <code>String</code> of the unparsed entity decl\n+ * @param notationName <code>String</code> of the unparsed entity decl\n+ */\n+ public void unparsedEntityDecl(String name, String publicID,\n+ String systemID, String notationName)\n+ throws SAXException {\n+\n+ if (!inInternalSubset) return;\n+\n+ internalSubset.append(" <!ENTITY ")\n+ .append(name);\n+ appendExternalId(publicID, systemID);\n+ internalSubset.append(" NDATA ")\n+ .append(notationName);\n+ internalSubset.append(">\\n");\n+ }\n+\n+ /**\n+ * Appends an external ID to the internal subset buffer. Either publicID\n+ * or systemID may be null, but not both.\n+ *\n+ * @param publicID the public ID\n+ * @param systemID the system ID\n+ */\n+ private void appendExternalId(String publicID, String systemID) {\n+ if (publicID != null) {\n+ internalSubset.append(" PUBLIC \\"")\n+ .append(publicID)\n+ .append(\'\\"\');\n+ }\n+ if (systemID != null) {\n+ if (publicID == null) {\n+ internalSubset.append(" SYSTEM ");\n+ }\n+ else {\n+ internalSubset.append(\' \');\n+ }\n+ internalSubset.append(\'\\"\')\n+ .append(systemID)\n+ .append(\'\\"\');\n+ }\n+ }\n+\n+ /**\n+ * Returns the being-parsed element.\n+ *\n+ * @return <code>Element</code> - element being built.\n+ * @throws SAXException\n+ */\n+ public Element getCurrentElement() throws SAXException {\n+ if (currentElement == null) {\n+ throw new SAXException(\n+ "Ill-formed XML document (multiple root elements detected)");\n+ }\n+ return currentElement;\n+ }\n+\n+ /**\n+ * Returns the the JDOM Attribute type value from the SAX 2.0\n+ * attribute type string provided by the parser.\n+ *\n+ * @param typeName <code>String</code> the SAX 2.0 attribute\n+ * type string.\n+ *\n+ * @return <code>int</code> the JDOM attribute type.\n+ *\n+ * @see Attribute#setAttributeType\n+ * @see Attributes#getType\n+ */\n+ private static int getAttributeType(String typeName) {\n+ Integer type = (Integer)(attrNameToTypeMap.get(typeName));\n+ if (type == null) {\n+ if (typeName != null && typeName.length() > 0 &&\n+ typeName.charAt(0) == \'(\') {\n+ // Xerces 1.4.X reports attributes of enumerated type with\n+ // a type string equals to the enumeration definition, i.e.\n+ // starting with a parenthesis.\n+ return Attribute.ENUMERATED_TYPE;\n+ }\n+ else {\n+ return Attribute.UNDECLARED_TYPE;\n+ }\n+ } else {\n+ return type.intValue();\n+ }\n+ }\n+\n+ /**\n+ * Receives an object for locating the origin of SAX document\n+ * events. This method is invoked by the SAX parser.\n+ * <p>\n+ * {@link org.jdom.JDOMFactory} implementations can use the\n+ * {@link #getDocumentLocator} method to get access to the\n+ * {@link Locator} during parse.\n+ * </p>\n+ *\n+ * @param locator <code>Locator</code> an object that can return\n+ * the location of any SAX document event.\n+ */\n+ public void setDocumentLocator(Locator locator) {\n+ this.locator = locator;\n+ }\n+\n+ /**\n+ * Provides access to the {@link Locator} object provided by the\n+ * SAX parser.\n+ *\n+ * @return <code>Locator</code> an object that can return\n+ * the location of any SAX document event.\n+ */\n+ public Locator getDocumentLocator() {\n+ return locator;\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/input/TextBuffer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/input/TextBuffer.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,186 @@ +/*-- + + $Id: TextBuffer.java,v 1.10 2007/11/10 05:29:00 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.input; + +import org.jdom.*; + +/** + * A non-public utility class similar to StringBuffer but optimized for XML + * parsing where the common case is that you get only one chunk of characters + * per text section. TextBuffer stores the first chunk of characters in a + * String, which can just be returned directly if no second chunk is received. + * Subsequent chunks are stored in a supplemental char array (like StringBuffer + * uses). In this case, the returned text will be the first String chunk, + * concatenated with the subsequent chunks stored in the char array. This + * provides optimal performance in the common case, while still providing very + * good performance in the uncommon case. Furthermore, avoiding StringBuffer + * means that no extra unused char array space will be kept around after parsing + * is through. + * + * @version $Revision: 1.10 $, $Date: 2007/11/10 05:29:00 $ + * @author Bradley S. Huffman + * @author Alex Rosen + */ +class TextBuffer { + + private static final String CVS_ID = + "@(#) $RCSfile: TextBuffer.java,v $ $Revision: 1.10 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1_1 $"; + + /** The first part of the text value (the "prefix"). If null, the + * text value is the empty string. */ + private String prefixString; + + /** The rest of the text value (the "suffix"). Only the first + * code>arraySize</code> characters are valid. */ + private char[] array; + + /** The size of the rest of the text value. If zero, then only + * code>prefixString</code> contains the text value. */ + private int arraySize; + + /** Constructor */ + TextBuffer() { + array = new char[4096]; // initial capacity + arraySize = 0; + } + + /** Append the specified text to the text value of this buffer. */ + void append(char[] source, int start, int count) { + if (prefixString == null) { + // This is the first chunk, so we'll store it in the prefix string + prefixString = new String(source, start, count); + } + else { + // This is a subsequent chunk, so we'll add it to the char array + ensureCapacity(arraySize + count); + System.arraycopy(source, start, array, arraySize, count); + arraySize += count; + } + } + + /** Returns the size of the text value. */ + int size() { + if (prefixString == null) { + return 0; + } + else { + return prefixString.length() + arraySize; + } + } + + /** Clears the text value and prepares the TextBuffer for reuse. */ + void clear() { + arraySize = 0; + prefixString = null; + } + + boolean isAllWhitespace() { + if ((prefixString == null) || (prefixString.length() == 0)) { + return true; + } + + int size = prefixString.length(); + for(int i = 0; i < size; i++) { + if ( !Verifier.isXMLWhitespace(prefixString.charAt(i))) { + return false; + } + } + + for(int i = 0; i < arraySize; i++) { + if ( !Verifier.isXMLWhitespace(array[i])) { + return false; + } + } + return true; + } + + /** Returns the text value stored in the buffer. */ + public String toString() { + if (prefixString == null) { + return ""; + } + + String str = ""; + if (arraySize == 0) { + // Char array is empty, so the text value is just prefixString. + str = prefixString; + } + else { + // Char array is not empty, so the text value is prefixString + // plus the char array. + str = new StringBuffer(prefixString.length() + arraySize) + .append(prefixString) + .append(array, 0, arraySize) + .toString(); + } + return str; + } + + // Ensure that the char array has room for at least "csize" characters. + private void ensureCapacity(int csize) { + int capacity = array.length; + if (csize > capacity) { + char[] old = array; + int nsize = capacity; + while (csize > nsize) { + nsize += (capacity/2); + } + array = new char[nsize]; + System.arraycopy(old, 0, array, 0, arraySize); + } + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/input/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/input/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,10 @@ +<body> + +Classes to build JDOM documents from various sources. The most common builder +class is SAXBuilder which constructs a JDOM document using a SAX parser and +can pull content from files, streams, sockets, readers, and so on. It can use +any underlying SAX parser to handle the parsing chores. SAXHandler provides +support for SAXBuilder. DOMBuilder lets you build from a pre-existing DOM +tree. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/output/DOMOutputter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/output/DOMOutputter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,454 @@\n+/*-- \n+\n+ $Id: DOMOutputter.java,v 1.43 2007/11/10 05:29:01 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+\n+package org.jdom.output;\n+\n+import java.util.*;\n+\n+import org.jdom.*;\n+import org.jdom.adapters.*;\n+\n+\n+/**\n+ * Outputs a JDOM {@link org.jdom.Document org.jdom.Document} as a DOM {@link\n+ * org.w3c.dom.Document org.w3c.dom.Document}.\n+ *\n+ * @version $Revision: 1.43 $, $Date: 2007/11/10 05:29:01 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Matthew Merlo\n+ * @author Dan Schaffer\n+ * @author Yusuf Goolamabbas\n+ * @author Bradley S. Huffman\n+ */\n+public class DOMOutputter {\n+\n+ private static final String CVS_ID = \n+ "@(#) $RCSfile: DOMOutputter.java,v $ $Revision: 1.43 $ $Date: 2007/11/10 05:29:01 $ $Name: jdom_1_1_1 $";\n+\n+ /** Default adapter class */\n+ private static final String DEFAULT_ADAPTER_CLASS =\n+ "org.jdom.adapters.XercesDOMAdapter";\n+\n+ /** Adapter to use for interfacing with the DOM implementation */\n+ private String adapterClass;\n+\n+ /** Output a DOM with namespaces but just the empty namespace */\n+ private boolean forceNamespaceAware;\n+\n+ /**\n+ * This creates a new DOMOutputter which will attempt to first locate\n+ * a DOM implementation to use via JAXP, and if JAXP does not exist or\n+ * there\'s a problem, will fall back to the default parser.\n+ */\n+ public DOMOutputter() {\n+ // nothing\n+ }\n+\n+ /**\n+ * This creates a '..b' org.w3c.dom.Text domText = domDoc.createTextNode(str);\n+ domElement.appendChild(domText);\n+ }\n+ else if (node instanceof CDATA) {\n+ CDATA cdata = (CDATA) node;\n+ org.w3c.dom.CDATASection domCdata =\n+ domDoc.createCDATASection(cdata.getText());\n+ domElement.appendChild(domCdata);\n+ }\n+ else if (node instanceof Text) {\n+ Text text = (Text) node;\n+ org.w3c.dom.Text domText =\n+ domDoc.createTextNode(text.getText());\n+ domElement.appendChild(domText);\n+ }\n+ else if (node instanceof Comment) {\n+ Comment comment = (Comment) node;\n+ org.w3c.dom.Comment domComment =\n+ domDoc.createComment(comment.getText());\n+ domElement.appendChild(domComment);\n+ }\n+ else if (node instanceof ProcessingInstruction) {\n+ ProcessingInstruction pi = \n+ (ProcessingInstruction) node;\n+ org.w3c.dom.ProcessingInstruction domPI =\n+ domDoc.createProcessingInstruction(\n+ pi.getTarget(), pi.getData());\n+ domElement.appendChild(domPI);\n+ }\n+ else if (node instanceof EntityRef) {\n+ EntityRef entity = (EntityRef) node;\n+ org.w3c.dom.EntityReference domEntity =\n+ domDoc.createEntityReference(entity.getName());\n+ domElement.appendChild(domEntity);\n+ }\n+ else {\n+ throw new JDOMException(\n+ "Element contained content with type:" +\n+ node.getClass().getName());\n+ }\n+ }\n+ \n+ // Remove declared namespaces from stack\n+ while (namespaces.size() > previouslyDeclaredNamespaces) {\n+ namespaces.pop();\n+ }\n+\n+ return domElement;\n+ }\n+ catch (Exception e) {\n+ throw new JDOMException("Exception outputting Element " +\n+ element.getQualifiedName(), e);\n+ }\n+ }\n+\n+ private org.w3c.dom.Attr output(Attribute attribute,\n+ org.w3c.dom.Document domDoc)\n+ throws JDOMException {\n+ org.w3c.dom.Attr domAttr = null;\n+ try {\n+ if (attribute.getNamespace() == Namespace.NO_NAMESPACE) {\n+ // No namespace, use createAttribute\n+ if (forceNamespaceAware) {\n+ domAttr = domDoc.createAttributeNS(null, attribute.getQualifiedName());\n+ } else {\n+ domAttr = domDoc.createAttribute(attribute.getQualifiedName());\n+ }\n+ }\n+ else {\n+ domAttr = domDoc.createAttributeNS(attribute.getNamespaceURI(),\n+ attribute.getQualifiedName());\n+ }\n+ domAttr.setValue(attribute.getValue());\n+ } catch (Exception e) {\n+ throw new JDOMException("Exception outputting Attribute " +\n+ attribute.getQualifiedName(), e);\n+ }\n+ return domAttr;\n+ }\n+\n+ /**\n+ * This will handle adding any <code>{@link Namespace}</code>\n+ * attributes to the DOM tree.\n+ *\n+ * @param ns <code>Namespace</code> to add definition of\n+ */\n+ private static String getXmlnsTagFor(Namespace ns) {\n+ String attrName = "xmlns";\n+ if (!ns.getPrefix().equals("")) {\n+ attrName += ":";\n+ attrName += ns.getPrefix();\n+ }\n+ return attrName;\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/output/EscapeStrategy.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/output/EscapeStrategy.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,76 @@ +/*-- + + $Id: EscapeStrategy.java,v 1.4 2007/11/10 05:29:01 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.output; + +/** + * Logic to determine which characters should be formatted as character + * entities. + * + * @version $Revision: 1.4 $, $Date: 2007/11/10 05:29:01 $ + * @author Alex Rosen + * @author Bradley S. Huffman + * @author Jason Hunter + */ +public interface EscapeStrategy { + + /** + * Test whether the supplied character should be formatted literally + * or as a character entity. + */ + public boolean shouldEscape(char ch); +} + |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/output/Format.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/output/Format.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,615 @@\n+/*--\n+\n+ $Id: Format.java,v 1.14 2009/07/23 05:54:23 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.output;\n+\n+import java.lang.reflect.Method;\n+import org.jdom.Verifier;\n+\n+/**\n+ * Class to encapsulate XMLOutputter format options.\n+ * Typical users can use the standard format configurations obtained by\n+ * {@link #getRawFormat} (no whitespace changes),\n+ * {@link #getPrettyFormat} (whitespace beautification), and\n+ * {@link #getCompactFormat} (whitespace normalization).\n+ * <p>\n+ * Several modes are available to effect the way textual content is printed.\n+ * See the documentation for {@link TextMode} for details.\n+ *\n+ * @version $Revision: 1.14 $, $Date: 2009/07/23 05:54:23 $\n+ * @author Jason Hunter\n+ */\n+public class Format implements Cloneable {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: Format.java,v $ $Revision: 1.14 $ $Date: 2009/07/23 05:54:23 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * Returns a new Format object that performs no whitespace changes, uses\n+ * the UTF-8 encoding, doesn\'t expand empty elements, includes the\n+ * declaration and encoding, and uses the default entity escape strategy.\n+ * Tweaks can be made to the returned Format instance without affecting\n+ * other instances.\n+\n+ * @return a Format with no whitespace changes\n+ */\n+ public static Format getRawFormat() {\n+ return new Format();\n+ }\n+\n+ /**\n+ * Returns a new '..b'nvoke(encoder, new Object[]{new Character(ch)});\n+ return !val.booleanValue();\n+ }\n+ catch (Exception ignored) {\n+ }\n+ }\n+ // Return false if we don\'t know. This risks not escaping\n+ // things which should be escaped, but also means people won\'t\n+ // start getting loads of unnecessary escapes.\n+ return false;\n+ }\n+ }\n+ }\n+\n+\n+ /**\n+ * Class to signify how text should be handled on output. The following\n+ * table provides details.\n+ *\n+ * <table>\n+ * <tr>\n+ * <th align="left">\n+ * Text Mode\n+ * </th>\n+ * <th>\n+ * Resulting behavior.\n+ * </th>\n+ * </tr>\n+ *\n+ * <tr valign="top">\n+ * <td>\n+ * <i>PRESERVE (Default)</i>\n+ * </td>\n+ * <td>\n+ * All content is printed in the format it was created, no whitespace\n+ * or line separators are are added or removed.\n+ * </td>\n+ * </tr>\n+ *\n+ * <tr valign="top">\n+ * <td>\n+ * TRIM_FULL_WHITE\n+ * </td>\n+ * <td>\n+ * Content between tags consisting of all whitespace is not printed.\n+ * If the content contains even one non-whitespace character, it is\n+ * printed verbatim, whitespace and all.\n+ * </td>\n+ * </tr>\n+ *\n+ * <tr valign="top">\n+ * <td>\n+ * TRIM\n+ * </td>\n+ * <td>\n+ * Same as TrimAllWhite, plus leading/trailing whitespace are\n+ * trimmed.\n+ * </td>\n+ * </tr>\n+ *\n+ * <tr valign="top">\n+ * <td>\n+ * NORMALIZE\n+ * </td>\n+ * <td>\n+ * Same as TextTrim, plus addition interior whitespace is compressed\n+ * to a single space.\n+ * </td>\n+ * </tr>\n+ * </table>\n+ *\n+ * In most cases textual content is aligned with the surrounding tags\n+ * (after the appropriate text mode is applied). In the case where the only\n+ * content between the start and end tags is textual, the start tag, text,\n+ * and end tag are all printed on the same line. If the document being\n+ * output already has whitespace, it\'s wise to turn on TRIM mode so the\n+ * pre-existing whitespace can be trimmed before adding new whitespace.\n+ * <p>\n+ * When a element has a xml:space attribute with the value of "preserve",\n+ * all formating is turned off and reverts back to the default until the\n+ * element and its contents have been printed. If a nested element contains\n+ * another xml:space with the value "default" formatting is turned back on\n+ * for the child element and then off for the remainder of the parent\n+ * element.\n+ */\n+ public static class TextMode {\n+ /**\n+ * Mode for literal text preservation.\n+ */\n+ public static final TextMode PRESERVE = new TextMode("PRESERVE");\n+\n+ /**\n+ * Mode for text trimming (left and right trim).\n+ */\n+ public static final TextMode TRIM = new TextMode("TRIM");\n+\n+ /**\n+ * Mode for text normalization (left and right trim plus internal\n+ * whitespace is normalized to a single space.\n+ * @see org.jdom.Element#getTextNormalize\n+ */\n+ public static final TextMode NORMALIZE = new TextMode("NORMALIZE");\n+\n+ /**\n+ * Mode for text trimming of content consisting of nothing but\n+ * whitespace but otherwise not changing output.\n+ */\n+ public static final TextMode TRIM_FULL_WHITE =\n+ new TextMode("TRIM_FULL_WHITE");\n+\n+ private final String name;\n+\n+ private TextMode(String name) {\n+ this.name = name;\n+ }\n+\n+ public String toString() {\n+ return name;\n+ }\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/output/JDOMLocator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/output/JDOMLocator.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,118 @@ +/*-- + + $Id: JDOMLocator.java,v 1.4 2007/11/10 05:29:01 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.output; + +import org.xml.sax.*; +import org.xml.sax.helpers.*; + +/** + * An implementation of the SAX {@link Locator} interface that + * exposes the JDOM node being processed by SAXOutputter. + * + * @author Laurent Bihanic + * + * @version $Revision: 1.4 $, $Date: 2007/11/10 05:29:01 $ + */ +public class JDOMLocator extends LocatorImpl { + + private static final String CVS_ID = + "@(#) $RCSfile: JDOMLocator.java,v $ $Revision: 1.4 $ $Date: 2007/11/10 05:29:01 $ $Name: jdom_1_1_1 $"; + + /** The JDOM node being processed by SAXOutputter. */ + private Object node; + + /** + * Default no-arg constructor. + */ + JDOMLocator() { // package protected + super(); + } + + /** + * Copy contructor. + * + * @param locator <code>Locator</code> to copy location + * information from. + */ + JDOMLocator(Locator locator) { // package protected + super(locator); + + if (locator instanceof JDOMLocator) { + this.setNode(((JDOMLocator)locator).getNode()); + } + } + + /** + * Returns the JDOM node being processed by SAXOutputter. + * + * @return the JDOM node being processed by SAXOutputter. + */ + public Object getNode() { + return this.node; + } + + /** + * Sets the being-processed node. + * + * @param node <code>Object</code> node currently processed + * by SAXOutputter. + */ + void setNode(Object node) { // package protected + this.node = node; + } +} + |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/output/NamespaceStack.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/output/NamespaceStack.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,154 @@ +/*-- + + $Id: NamespaceStack.java,v 1.14 2007/11/10 05:29:01 jhunter Exp $ + + Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ +package org.jdom.output; + +import java.util.*; + +import org.jdom.Namespace; + +/** + * A non-public utility class used by both <code>{@link XMLOutputter}</code> and + * <code>{@link SAXOutputter}</code> to manage namespaces in a JDOM Document + * during output. + * + * @version $Revision: 1.14 $, $Date: 2007/11/10 05:29:01 $ + * @author Elliotte Rusty Harolde + * @author Fred Trimble + * @author Brett McLaughlin + */ +class NamespaceStack { + + private static final String CVS_ID = + "@(#) $RCSfile: NamespaceStack.java,v $ $Revision: 1.14 $ $Date: 2007/11/10 05:29:01 $ $Name: jdom_1_1_1 $"; + + /** The prefixes available */ + private Stack prefixes; + + /** The URIs available */ + private Stack uris; + + /** + * This creates the needed storage. + */ + NamespaceStack() { + prefixes = new Stack(); + uris = new Stack(); + } + + /** + * This will add a new <code>{@link Namespace}</code> + * to those currently available. + * + * @param ns <code>Namespace</code> to add. + */ + public void push(Namespace ns) { + prefixes.push(ns.getPrefix()); + uris.push(ns.getURI()); + } + + /** + * This will remove the topmost (most recently added) + * <code>{@link Namespace}</code>, and return its prefix. + * + * @return <code>String</code> - the popped namespace prefix. + */ + public String pop() { + String prefix = (String)prefixes.pop(); + uris.pop(); + + return prefix; + } + + /** + * This returns the number of available namespaces. + * + * @return <code>int</code> - size of the namespace stack. + */ + public int size() { + return prefixes.size(); + } + + /** + * Given a prefix, this will return the namespace URI most + * rencently (topmost) associated with that prefix. + * + * @param prefix <code>String</code> namespace prefix. + * @return <code>String</code> - the namespace URI for that prefix. + */ + public String getURI(String prefix) { + int index = prefixes.lastIndexOf(prefix); + if (index == -1) { + return null; + } + String uri = (String)uris.elementAt(index); + return uri; + } + + /** + * This will print out the size and current stack, from the + * most recently added <code>{@link Namespace}</code> to + * the "oldest," all to <code>System.out</code>. + */ + public String toString() { + StringBuffer buf = new StringBuffer(); + String sep = System.getProperty("line.separator"); + buf.append("Stack: " + prefixes.size() + sep); + for (int i = 0; i < prefixes.size(); i++) { + buf.append(prefixes.elementAt(i) + "&" + uris.elementAt(i) + sep); + } + return buf.toString(); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/output/SAXOutputter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/output/SAXOutputter.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,1439 @@\n+/*--\n+\n+ $Id: SAXOutputter.java,v 1.40 2007/11/10 05:29:01 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.output;\n+\n+import java.io.*;\n+import java.lang.reflect.*;\n+import java.util.*;\n+\n+import org.jdom.*;\n+import org.xml.sax.*;\n+import org.xml.sax.ext.*;\n+import org.xml.sax.helpers.*;\n+\n+/**\n+ * Outputs a JDOM document as a stream of SAX2 events.\n+ * <p>\n+ * Most ContentHandler callbacks are supported. Both\n+ * <code>ignorableWhitespace()</code> and <code>skippedEntity()</code> have not\n+ * been implemented. The <code>{@link JDOMLocator}</code> class returned by\n+ * <code>{@link #getLocator}</code> exposes the current node being operated\n+ * upon.\n+ * <p>\n+ * At this time, it is not possible to access notations and unparsed entity\n+ * references in a DTD from JDOM. Therefore, <code>DTDHandler</code> callbacks\n+ * have not been implemented yet.\n+ * <p>\n+ * The <code>ErrorHandler</code> callbacks have not been implemented, since\n+ * these are supposed to be invoked when the document is parsed and at this\n+ * point the document exists in memory and is known to have no errors. </p>\n+ *\n+ * @version $Revision: 1.40 $, $Date: 2007/11/10 05:29:01 $\n+ * @author Brett McLaughlin\n+ * @author Jason Hunter\n+ * @author Fred Trimble\n+ * @author Bradley S. Huffman\n+ */\n+public class SAXOutputter {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: SAXOutputter.java,v $ $Revision: 1.40 $ $Date: 2007/11/10 05:29:01 $ $Name: jdo'..b'r", null);\n+ parser = (XMLReader)getXMLReader.invoke(jaxpParser, null);\n+ } catch (ClassNotFoundException e) {\n+ //e.printStackTrace();\n+ } catch (InvocationTargetException e) {\n+ //e.printStackTrace();\n+ } catch (NoSuchMethodException e) {\n+ //e.printStackTrace();\n+ } catch (IllegalAccessException e) {\n+ //e.printStackTrace();\n+ }\n+\n+ // Check to see if we got a parser yet, if not, try to use a\n+ // hard coded default\n+ if (parser == null) {\n+ parser = XMLReaderFactory.createXMLReader(\n+ "org.apache.xerces.parsers.SAXParser");\n+ }\n+ return parser;\n+ }\n+\n+ /**\n+ * <p>\n+ * This will create a SAX XMLReader capable of parsing a DTD and\n+ * configure it so that the DTD parsing events are routed to the\n+ * handlers registered onto this SAXOutputter.\n+ * </p>\n+ *\n+ * @return <code>XMLReader</code> a SAX2 parser.\n+ *\n+ * @throws JDOMException if no parser can be created.\n+ */\n+ private XMLReader createDTDParser() throws JDOMException {\n+ XMLReader parser = null;\n+\n+ // Get a parser instance\n+ try\n+ {\n+ parser = createParser();\n+ }\n+ catch (Exception ex1) {\n+ throw new JDOMException("Error in SAX parser allocation", ex1);\n+ }\n+\n+ // Register handlers\n+ if (this.getDTDHandler() != null) {\n+ parser.setDTDHandler(this.getDTDHandler());\n+ }\n+ if (this.getEntityResolver() != null) {\n+ parser.setEntityResolver(this.getEntityResolver());\n+ }\n+ if (this.getLexicalHandler() != null) {\n+ try {\n+ parser.setProperty(LEXICAL_HANDLER_SAX_PROPERTY,\n+ this.getLexicalHandler());\n+ }\n+ catch (SAXException ex1) {\n+ try {\n+ parser.setProperty(LEXICAL_HANDLER_ALT_PROPERTY,\n+ this.getLexicalHandler());\n+ } catch (SAXException ex2) {\n+ // Forget it!\n+ }\n+ }\n+ }\n+ if (this.getDeclHandler() != null) {\n+ try {\n+ parser.setProperty(DECL_HANDLER_SAX_PROPERTY,\n+ this.getDeclHandler());\n+ }\n+ catch (SAXException ex1) {\n+ try {\n+ parser.setProperty(DECL_HANDLER_ALT_PROPERTY,\n+ this.getDeclHandler());\n+ } catch (SAXException ex2) {\n+ // Forget it!\n+ }\n+ }\n+ }\n+\n+ // Absorb errors as much as possible, per Laurent\n+ parser.setErrorHandler(new DefaultHandler());\n+\n+ return parser;\n+ }\n+\n+ /**\n+ * Returns a JDOMLocator object referencing the node currently\n+ * being processed by this outputter. The returned object is a\n+ * snapshot of the location information and can thus safely be\n+ * memorized for later use.\n+ * <p>\n+ * This method allows direct access to the location information\n+ * maintained by SAXOutputter without requiring to implement\n+ * <code>XMLFilter</code>. (In SAX, locators are only available\n+ * though the <code>ContentHandler</code> interface).</p>\n+ * <p>\n+ * Note that location information is only available while\n+ * SAXOutputter is outputting nodes. Hence this method should\n+ * only be used by objects taking part in the output processing\n+ * such as <code>ErrorHandler</code>s.\n+ *\n+ * @return a JDOMLocator object referencing the node currently\n+ * being processed or <code>null</code> if no output\n+ * operation is being performed.\n+ */\n+ public JDOMLocator getLocator() {\n+ return (locator != null)? new JDOMLocator(locator): null;\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/output/XMLOutputter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/output/XMLOutputter.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,1640 @@\n+/*--\n+\n+ $Id: XMLOutputter.java,v 1.117 2009/07/23 05:54:23 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.output;\n+\n+import java.io.*;\n+import java.util.*;\n+\n+import javax.xml.transform.Result;\n+\n+import org.jdom.*;\n+\n+/**\n+ * Outputs a JDOM document as a stream of bytes. The outputter can manage many\n+ * styles of document formatting, from untouched to pretty printed. The default\n+ * is to output the document content exactly as created, but this can be changed\n+ * by setting a new Format object. For pretty-print output, use\n+ * <code>{@link Format#getPrettyFormat()}</code>. For whitespace-normalized\n+ * output, use <code>{@link Format#getCompactFormat()}</code>.\n+ * <p>\n+ * There are <code>{@link #output output(...)}</code> methods to print any of\n+ * the standard JDOM classes, including Document and Element, to either a Writer\n+ * or an OutputStream. <b>Warning</b>: When outputting to a Writer, make sure\n+ * the writer\'s encoding matches the encoding setting in the Format object. This\n+ * ensures the encoding in which the content is written (controlled by the\n+ * Writer configuration) matches the encoding placed in the document\'s XML\n+ * declaration (controlled by the XMLOutputter). Because a Writer cannot be\n+ * queried for its encoding, the information must be passed to the Format\n+ * manually in its constructor or via the\n+ * <code>{@link Format#setEncoding}</code> method. The default encoding is\n+ * UTF-8.\n+ * <p>\n+ * The met'..b' return super.clone();\n+ }\n+ catch (java.lang.CloneNotSupportedException e) {\n+ // even though this should never ever happen, it\'s still\n+ // possible to fool Java into throwing a\n+ // CloneNotSupportedException. If that happens, we\n+ // shouldn\'t swallow it.\n+ throw new RuntimeException(e.toString());\n+ }\n+ }\n+\n+ /**\n+ * Return a string listing of the settings for this\n+ * XMLOutputter instance.\n+ *\n+ * @return a string listing the settings for this XMLOutputter instance\n+ */\n+ public String toString() {\n+ StringBuffer buffer = new StringBuffer();\n+ for (int i = 0; i < userFormat.lineSeparator.length(); i++) {\n+ char ch = userFormat.lineSeparator.charAt(i);\n+ switch (ch) {\n+ case \'\\r\': buffer.append("\\\\r");\n+ break;\n+ case \'\\n\': buffer.append("\\\\n");\n+ break;\n+ case \'\\t\': buffer.append("\\\\t");\n+ break;\n+ default: buffer.append("[" + ((int)ch) + "]");\n+ break;\n+ }\n+ }\n+\n+ return (\n+ "XMLOutputter[omitDeclaration = " + userFormat.omitDeclaration + ", " +\n+ "encoding = " + userFormat.encoding + ", " +\n+ "omitEncoding = " + userFormat.omitEncoding + ", " +\n+ "indent = \'" + userFormat.indent + "\'" + ", " +\n+ "expandEmptyElements = " + userFormat.expandEmptyElements + ", " +\n+ "lineSeparator = \'" + buffer.toString() + "\', " +\n+ "textMode = " + userFormat.mode + "]"\n+ );\n+ }\n+\n+ /**\n+ * Factory for making new NamespaceStack objects. The NamespaceStack\n+ * created is actually an inner class extending the package protected\n+ * NamespaceStack, as a way to make NamespaceStack "friendly" toward\n+ * subclassers.\n+ */\n+ private NamespaceStack createNamespaceStack() {\n+ // actually returns a XMLOutputter.NamespaceStack (see below)\n+ return new NamespaceStack();\n+ }\n+\n+ /**\n+ * Our own null subclass of NamespaceStack. This plays a little\n+ * trick with Java access protection. We want subclasses of\n+ * XMLOutputter to be able to override protected methods that\n+ * declare a NamespaceStack parameter, but we don\'t want to\n+ * declare the parent NamespaceStack class as public.\n+ */\n+ protected class NamespaceStack\n+ extends org.jdom.output.NamespaceStack\n+ {\n+ }\n+\n+ // Support method to print a name without using elt.getQualifiedName()\n+ // and thus avoiding a StringBuffer creation and memory churn\n+ private void printQualifiedName(Writer out, Element e) throws IOException {\n+ if (e.getNamespace().getPrefix().length() == 0) {\n+ out.write(e.getName());\n+ }\n+ else {\n+ out.write(e.getNamespace().getPrefix());\n+ out.write(\':\');\n+ out.write(e.getName());\n+ }\n+ }\n+\n+ // Support method to print a name without using att.getQualifiedName()\n+ // and thus avoiding a StringBuffer creation and memory churn\n+ private void printQualifiedName(Writer out, Attribute a) throws IOException {\n+ String prefix = a.getNamespace().getPrefix();\n+ if ((prefix != null) && (!prefix.equals(""))) {\n+ out.write(prefix);\n+ out.write(\':\');\n+ out.write(a.getName());\n+ }\n+ else {\n+ out.write(a.getName());\n+ }\n+ }\n+\n+ // * * * * * * * * * * Deprecated methods * * * * * * * * * *\n+\n+ /* The methods below here are deprecations of protected methods. We\n+ * don\'t usually deprecate protected methods, so they\'re commented out.\n+ * They\'re left here in case this mass deprecation causes people trouble.\n+ * Since we\'re getting close to 1.0 it\'s actually better for people to\n+ * raise issues early though.\n+ */\n+\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/output/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/output/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,15 @@ +<body> + +Classes to output JDOM documents to various destinations. The most common +outputter class is XMLOutputter which outputs a document (or part of a +document) as a stream of bytes. Format and EscapeStrategy support the +XMLOutputter in letting you choose how the output should be formatted and how +special characters should be escaped. + +SAXOutputter lets you output as a stream of SAX events (handy especially in +transformations). JDOMLocator supports SAXOutputter and helps you observe the +SAX output process. + +DOMOutputter lets you output a JDOM document as a DOM tree. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,13 @@ +<body> + +Classes to represent the components of an XML document. The Verifier is a +special class useful in ensuring well-formedness of documents. The Parent +interface is implemented by Document and Element exposing their commonality. +The Content abstract class is extended by all the node types of a document +except Document itself. + +The JDOMFactory interface and DefaultJDOMFactory standard implementation +provide advanced users with the ability to create subtypes of the org.jdom +classes. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/transform/JDOMResult.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/transform/JDOMResult.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,670 @@\n+/*-- \n+\n+ $Id: JDOMResult.java,v 1.24 2007/11/10 05:29:02 jhunter Exp $\n+\n+ Copyright (C) 2001-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+package org.jdom.transform;\n+\n+import java.util.*;\n+\n+import javax.xml.transform.sax.*;\n+\n+import org.jdom.*;\n+import org.jdom.input.*;\n+import org.xml.sax.*;\n+import org.xml.sax.ext.*;\n+import org.xml.sax.helpers.*;\n+\n+/**\n+ * A holder for an XSL Transformation result, generally a list of nodes\n+ * although it can be a JDOM Document also. As stated by the XSLT 1.0\n+ * specification, the result tree generated by an XSL transformation is not\n+ * required to be a well-formed XML document. The result tree may have "any\n+ * sequence of nodes as children that would be possible for an\n+ * element node".\n+ * <p>\n+ * The following example shows how to apply an XSL Transformation\n+ * to a JDOM document and get the transformation result in the form\n+ * of a list of JDOM nodes:\n+ * <pre><code>\n+ * public static List transform(Document doc, String stylesheet)\n+ * throws JDOMException {\n+ * try {\n+ * Transformer transformer = TransformerFactory.newInstance()\n+ * .newTransformer(new StreamSource(stylesheet));\n+ * JDOMSource in = new JDOMSource(doc);\n+ * JDOMResult out = new JDOMResult();\n+ * transformer.transform(in, out);\n+ * return out.getResult();\n+ * }\n+ * catch (TransformerException e) {\n+ * throw new JDOMException("XSLT Transfo'..b' throws SAXException {\n+ this.ensureInitialization();\n+ super.processingInstruction(target, data);\n+ }\n+\n+ /**\n+ * <i>[SAX ContentHandler interface support]</i> Receives\n+ * notification of a skipped entity.\n+ */\n+ public void skippedEntity(String name) throws SAXException {\n+ this.ensureInitialization();\n+ super.skippedEntity(name);\n+ }\n+\n+ //-----------------------------------------------------------------------\n+ // LexicalHandler interface support\n+ //-----------------------------------------------------------------------\n+\n+ /**\n+ * <i>[SAX LexicalHandler interface support]</i> Reports the\n+ * start of DTD declarations, if any.\n+ *\n+ * @param name the document type name.\n+ * @param publicId the declared public identifier for the\n+ * external DTD subset, or <code>null</code>\n+ * if none was declared.\n+ * @param systemId the declared system identifier for the\n+ * external DTD subset, or <code>null</code>\n+ * if none was declared.\n+ *\n+ * @throws SAXException The application may raise an exception.\n+ */\n+ public void startDTD(String name, String publicId, String systemId)\n+ throws SAXException {\n+ this.ensureInitialization();\n+ this.saxHandler.startDTD(name, publicId, systemId);\n+ }\n+\n+ /**\n+ * <i>[SAX LexicalHandler interface support]</i> Reports the end\n+ * of DTD declarations.\n+ *\n+ * @throws SAXException The application may raise an exception.\n+ */\n+ public void endDTD() throws SAXException {\n+ this.saxHandler.endDTD();\n+ }\n+\n+ /**\n+ * <i>[SAX LexicalHandler interface support]</i> Reports the\n+ * beginning of some internal and external XML entities.\n+ *\n+ * @param name the name of the entity. If it is a parameter\n+ * entity, the name will begin with \'%\', and if it\n+ * is the external DTD subset, it will be "[dtd]".\n+ *\n+ * @throws SAXException The application may raise an exception.\n+ */\n+ public void startEntity(String name) throws SAXException {\n+ this.ensureInitialization();\n+ this.saxHandler.startEntity(name);\n+ }\n+\n+ /**\n+ * <i>[SAX LexicalHandler interface support]</i> Reports the end\n+ * of an entity.\n+ *\n+ * @param name the name of the entity that is ending.\n+ *\n+ * @throws SAXException The application may raise an exception.\n+ */\n+ public void endEntity(String name) throws SAXException {\n+ this.saxHandler.endEntity(name);\n+ }\n+\n+ /**\n+ * <i>[SAX LexicalHandler interface support]</i> Reports the\n+ * start of a CDATA section.\n+ *\n+ * @throws SAXException The application may raise an exception.\n+ */\n+ public void startCDATA() throws SAXException {\n+ this.ensureInitialization();\n+ this.saxHandler.startCDATA();\n+ }\n+\n+ /**\n+ * <i>[SAX LexicalHandler interface support]</i> Reports the end\n+ * of a CDATA section.\n+ *\n+ * @throws SAXException The application may raise an exception.\n+ */\n+ public void endCDATA() throws SAXException {\n+ this.saxHandler.endCDATA();\n+ }\n+\n+ /**\n+ * <i>[SAX LexicalHandler interface support]</i> Reports an XML\n+ * comment anywhere in the document.\n+ *\n+ * @param ch an array holding the characters in the comment.\n+ * @param start the starting position in the array.\n+ * @param length the number of characters to use from the array.\n+ *\n+ * @throws SAXException The application may raise an exception.\n+ */\n+ public void comment(char ch[], int start, int length)\n+ throws SAXException {\n+ this.ensureInitialization();\n+ this.saxHandler.comment(ch, start, length);\n+ }\n+ }\n+}\n+\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/transform/JDOMSource.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/transform/JDOMSource.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,535 @@\n+/*-- \n+\n+ $Id: JDOMSource.java,v 1.20 2007/11/10 05:29:02 jhunter Exp $\n+\n+ Copyright (C) 2001-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+ \n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+ \n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+ \n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows \n+ these conditions in the documentation and/or other materials \n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+ \n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+ \n+ In addition, we request (but do not require) that you include in the \n+ end-user documentation provided with the redistribution and/or in the \n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos \n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many \n+ individuals on behalf of the JDOM Project and was originally \n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+ \n+ */\n+\n+package org.jdom.transform;\n+\n+import java.io.*;\n+import java.util.*;\n+\n+import javax.xml.transform.sax.*;\n+\n+import org.jdom.*;\n+import org.jdom.output.*;\n+import org.xml.sax.*;\n+\n+/**\n+ * A holder for an XML Transformation source: a Document, Element, or list of\n+ * nodes.\n+ * <p>\n+ * The is provides input to a\n+ * {@link javax.xml.transform.Transformer JAXP TrAX Transformer}.\n+ * <p>\n+ * The following example shows how to apply an XSL Transformation\n+ * to a JDOM document and get the transformation result in the form\n+ * of a list of JDOM nodes:\n+ * <pre><code>\n+ * public static List transform(Document doc, String stylesheet)\n+ * throws JDOMException {\n+ * try {\n+ * Transformer transformer = TransformerFactory.newInstance()\n+ * .newTransformer(new StreamSource(stylesheet));\n+ * JDOMSource in = new JDOMSource(doc);\n+ * JDOMResult out = new JDOMResult();\n+ * transformer.transform(in, out);\n+ * return out.getResult();\n+ * }\n+ * catch (TransformerException e) {\n+ * throw new JDOMException("XSLT Transformation failed", e);\n+ * }\n+ * }\n+ * </code></pre>\n+ *\n+ * @see org.jdom.transform.JDOMResult\n+ *\n+ * @version $Revision: 1.20 $, $Date: 2007/11/10 05:29:02 $\n+ * @author Laurent Bihanic\n+ * @author Jason Hunter\n+ */\n'..b'ow new UnsupportedOperationException();\n+ }\n+\n+ /**\n+ * Gets the character stream for this input source.\n+ * <p>\n+ * Note that this method is only provided to make this\n+ * InputSource implementation acceptable by any XML\n+ * parser. As it generates an in-memory string representation\n+ * of the JDOM document, it is quite inefficient from both\n+ * speed and memory consumption points of view.\n+ * </p>\n+ *\n+ * @return a Reader to a string representation of the\n+ * source JDOM document.\n+ */\n+ public Reader getCharacterStream() {\n+ Object src = this.getSource();\n+ Reader reader = null;\n+\n+ if (src instanceof Document) {\n+ // Get an in-memory string representation of the document\n+ // and return a reader on it.\n+ reader = new StringReader(\n+ new XMLOutputter().outputString((Document)src));\n+ }\n+ else {\n+ if (src instanceof List) {\n+ reader = new StringReader(\n+ new XMLOutputter().outputString((List)src));\n+ }\n+ // Else: No source, no reader!\n+ }\n+ return reader;\n+ }\n+ }\n+\n+ //=========================================================================\n+ // DocumentReader nested class\n+ //=========================================================================\n+\n+ /**\n+ * An implementation of the SAX2 XMLReader interface that presents\n+ * a SAX view of a JDOM Document. The actual generation of the\n+ * SAX events is delegated to JDOM\'s SAXOutputter.\n+ *\n+ * @see org.jdom.Document\n+ * @see org.jdom.output.SAXOutputter\n+ */\n+ private static class DocumentReader extends SAXOutputter\n+ implements XMLReader {\n+ /**\n+ * Public default constructor.\n+ */\n+ public DocumentReader() {\n+ super();\n+ }\n+\n+ //----------------------------------------------------------------------\n+ // SAX XMLReader interface support\n+ //----------------------------------------------------------------------\n+\n+ /**\n+ * Parses an XML document from a system identifier (URI).\n+ * <p>\n+ * This implementation does not support reading XML data from\n+ * system identifiers, only from JDOM documents. Hence,\n+ * this method always throws a {@link SAXNotSupportedException}.\n+ * </p>\n+ *\n+ * @param systemId the system identifier (URI).\n+ *\n+ * @throws SAXNotSupportedException always!\n+ */\n+ public void parse(String systemId) throws SAXNotSupportedException {\n+ throw new SAXNotSupportedException(\n+ "Only JDOM Documents are supported as input");\n+ }\n+\n+ /**\n+ * Parses an XML document.\n+ * <p>\n+ * The methods accepts only <code>JDOMInputSource</code>s\n+ * instances as input sources.\n+ * </p>\n+ *\n+ * @param input the input source for the top-level of the\n+ * XML document.\n+ *\n+ * @throws SAXException any SAX exception,\n+ * possibly wrapping\n+ * another exception.\n+ * @throws SAXNotSupportedException if the input source does\n+ * not wrap a JDOM document.\n+ */\n+ public void parse(InputSource input) throws SAXException {\n+ if (input instanceof JDOMInputSource) {\n+ try {\n+ Object source = ((JDOMInputSource)input).getSource();\n+ if (source instanceof Document) {\n+ this.output((Document)source);\n+ }\n+ else {\n+ this.output((List)source);\n+ }\n+ }\n+ catch (JDOMException e) {\n+ throw new SAXException(e.getMessage(), e);\n+ }\n+ }\n+ else {\n+ throw new SAXNotSupportedException(\n+ "Only JDOM Documents are supported as input");\n+ }\n+ }\n+ }\n+}\n+\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/transform/XSLTransformException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/transform/XSLTransformException.java Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,82 @@ +/*-- + + $Id: XSLTransformException.java,v 1.4 2007/11/10 05:29:02 jhunter Exp $ + + Copyright (C) 2003-2007 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + +package org.jdom.transform; + +import org.jdom.JDOMException; + +/** + * Thrown when an XSL stylesheet fails to compile or an XSL transform fails + * + * @version $Revision: 1.4 $, $Date: 2007/11/10 05:29:02 $ + * @author Jason Hunter + */ +public class XSLTransformException extends JDOMException { + + private static final String CVS_ID = + "@(#) $RCSfile: XSLTransformException.java,v $ $Revision: 1.4 $ $Date: 2007/11/10 05:29:02 $ $Name: jdom_1_1_1 $"; + + public XSLTransformException() { + } + + public XSLTransformException(String message) { + super(message); + } + + public XSLTransformException(String message, Exception cause) { + super(message, cause); + } +} |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/transform/XSLTransformer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/transform/XSLTransformer.java Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,291 @@\n+/*--\n+\n+ $Id: XSLTransformer.java,v 1.5 2007/11/14 04:36:54 jhunter Exp $\n+\n+ Copyright (C) 2001-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.transform;\n+\n+import java.util.*;\n+import java.io.*;\n+import javax.xml.transform.*;\n+import javax.xml.transform.stream.StreamSource;\n+import org.jdom.*;\n+import org.xml.sax.EntityResolver;\n+\n+/**\n+ * A convenience class to handle simple transformations. The JAXP TrAX classes\n+ * have more bells and whistles and can be used with {@link JDOMSource} and\n+ * {@link JDOMResult} for advanced uses. This class handles the common case and\n+ * presents a simple interface. XSLTransformer is thread safe and may be\n+ * used from multiple threads.\n+ *\n+ * <pre><code>\n+ * XSLTransformer transformer = new XSLTransformer("file.xsl");\n+ *\n+ * Document x2 = transformer.transform(x); // x is a Document\n+ * Document y2 = transformer.transform(y); // y is a Document\n+ * </code></pre>\n+ *\n+ * JDOM relies on TrAX to perform the transformation.\n+ * The <code>javax.xml.transform.TransformerFactory</code> Java system property\n+ * determines which XSLT engine TrAX uses. Its value should be\n+ * the fully qualified name of the implementation of the abstract\n+ * <code>javax.xml.transform.TransformerFactory</code> class.\n+ * Values of this property for popular XSLT processors include:\n+ * </p>\n+ * <ul><li>Saxon 6.x: <code>com.icl.saxon.TransformerFactoryImpl</code></li>\n+ * <li>Saxon 7.x: <code>net.sf.saxon.TransformerFactoryImpl</code></li>\n+ * <'..b'specified\n+ * <code>File</code>.\n+ * </p>\n+ *\n+ * @param stylesheet <code>File</code> from which the stylesheet is read.\n+ * @throws XSLTransformException when an IOException, format error, or\n+ * something else prevents the stylesheet from being compiled\n+ */\n+ public XSLTransformer(File stylesheet) throws XSLTransformException {\n+ this(new StreamSource(stylesheet));\n+ }\n+\n+ /**\n+ * <p>\n+ * This will create a new <code>XSLTransformer</code> by\n+ * reading the stylesheet from the specified\n+ * <code>Document</code>.\n+ * </p>\n+ *\n+ * @param stylesheet <code>Document</code> containing the stylesheet.\n+ * @throws XSLTransformException when the supplied <code>Document</code>\n+ * is not syntactically correct XSLT\n+ */\n+ public XSLTransformer(Document stylesheet) throws XSLTransformException {\n+ this(new JDOMSource(stylesheet));\n+ }\n+\n+ /**\n+ * Transforms the given input nodes to a list of output nodes.\n+ *\n+ * @param inputNodes input nodes\n+ * @return transformed output nodes\n+ * @throws XSLTransformException if there\'s a problem in the transformation\n+ */\n+ public List transform(List inputNodes) throws XSLTransformException {\n+ JDOMSource source = new JDOMSource(inputNodes);\n+ JDOMResult result = new JDOMResult();\n+ result.setFactory(factory); // null ok\n+ try {\n+ templates.newTransformer().transform(source, result);\n+ return result.getResult();\n+ }\n+ catch (TransformerException e) {\n+ throw new XSLTransformException("Could not perform transformation", e);\n+ }\n+ }\n+ \n+ /**\n+ * Transforms the given document to an output document.\n+ *\n+ * @param inputDoc input document\n+ * @return transformed output document\n+ * @throws XSLTransformException if there\'s a problem in the transformation\n+ */\n+ public Document transform(Document inputDoc) throws XSLTransformException {\n+ \treturn transform(inputDoc, null);\n+ }\n+\n+ /**\n+ * Transforms the given document to an output document.\n+ *\n+ * @param inputDoc input document\n+ * @param resolver\t\t\t entity resolver for the input document\n+ * @return transformed output document\n+ * @throws XSLTransformException if there\'s a problem in the transformation\n+ */\n+ public Document transform(Document inputDoc, EntityResolver resolver) throws XSLTransformException {\n+ JDOMSource source = new JDOMSource(inputDoc, resolver);\n+ JDOMResult result = new JDOMResult();\n+ result.setFactory(factory); // null ok\n+ try {\n+ templates.newTransformer().transform(source, result);\n+ return result.getDocument();\n+ }\n+ catch (TransformerException e) {\n+ throw new XSLTransformException("Could not perform transformation", e);\n+ }\n+ }\n+\n+ /**\n+ * Sets a custom JDOMFactory to use when building the\n+ * transformation result. Use a custom factory to build the tree\n+ * with your own subclasses of the JDOM classes.\n+ *\n+ * @param factory the custom <code>JDOMFactory</code> to use or\n+ * <code>null</code> to use the default JDOM\n+ * classes.\n+ *\n+ * @see #getFactory\n+ */\n+ public void setFactory(JDOMFactory factory) {\n+ this.factory = factory;\n+ }\n+\n+ /**\n+ * Returns the custom JDOMFactory used to build the transformation\n+ * result.\n+ *\n+ * @return the custom <code>JDOMFactory</code> used to build the\n+ * transformation result or <code>null</code> if the\n+ * default JDOM classes are being used.\n+ *\n+ * @see #setFactory\n+ */\n+ public JDOMFactory getFactory() {\n+ return this.factory;\n+ }\n+}\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/transform/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/transform/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,8 @@ +<body> + +Classes to help with transformations, based on the JAXP TrAX classes. +JDOMTransformer supports simple transformations with one line of code. +Advanced features are available with the JDOMSource and JDOMResult classes +that interface with TrAX. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/xpath/JaxenXPath.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/xpath/JaxenXPath.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,356 @@\n+///*--\n+//\n+// $Id: JaxenXPath.java,v 1.20 2007/11/10 05:29:02 jhunter Exp $\n+//\n+// Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+// All rights reserved.\n+//\n+// Redistribution and use in source and binary forms, with or without\n+// modification, are permitted provided that the following conditions\n+// are met:\n+//\n+// 1. Redistributions of source code must retain the above copyright\n+// notice, this list of conditions, and the following disclaimer.\n+//\n+// 2. Redistributions in binary form must reproduce the above copyright\n+// notice, this list of conditions, and the disclaimer that follows\n+// these conditions in the documentation and/or other materials\n+// provided with the distribution.\n+//\n+// 3. The name "JDOM" must not be used to endorse or promote products\n+// derived from this software without prior written permission. For\n+// written permission, please contact <request_AT_jdom_DOT_org>.\n+//\n+// 4. Products derived from this software may not be called "JDOM", nor\n+// may "JDOM" appear in their name, without prior written permission\n+// from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+//\n+// In addition, we request (but do not require) that you include in the\n+// end-user documentation provided with the redistribution and/or in the\n+// software itself an acknowledgement equivalent to the following:\n+// "This product includes software developed by the\n+// JDOM Project (http://www.jdom.org/)."\n+// Alternatively, the acknowledgment may be graphical using the logos\n+// available at http://www.jdom.org/images/logos.\n+//\n+// THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+// DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+// SUCH DAMAGE.\n+//\n+// This software consists of voluntary contributions made by many\n+// individuals on behalf of the JDOM Project and was originally\n+// created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+// Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+// on the JDOM Project, please see <http://www.jdom.org/>.\n+//\n+// */\n+//\n+//package org.jdom.xpath;\n+//\n+//\n+//import java.util.*;\n+//\n+//import org.jaxen.*;\n+//import org.jaxen.jdom.*;\n+//import org.jdom.*;\n+//\n+//\n+///**\n+// * A non-public concrete XPath implementation for Jaxen.\n+// *\n+// * @version $Revision: 1.20 $, $Date: 2007/11/10 05:29:02 $\n+// * @author Laurent Bihanic\n+// */\n+//class JaxenXPath extends XPath { // package protected\n+//\n+// private static final String CVS_ID =\n+// "@(#) $RCSfile: JaxenXPath.java,v $ $Revision: 1.20 $ $Date: 2007/11/10 05:29:02 $ $Name: jdom_1_1_1 $";\n+//\n+// /**\n+// * The compiled XPath object to select nodes. This attribute can\n+// * not be made final as it needs to be set upon object\n+// * deserialization.\n+// */\n+// private transient JDOMXPath xPath;\n+//\n+// /**\n+// * The current context for XPath expression evaluation.\n+// */\n+// private Object currentContext;\n+//\n+// /**\n+// * Creates a new XPath wrapper object, compiling the specified\n+// * XPath expression.\n+// *\n+// * @param expr the XPath expression to wrap.\n+// *\n+// * @throws JDOMException if the XPath expression is invalid.\n+// */\n+// public JaxenXPath(String expr) throws JDOMException {\n+// setXPath(expr);\n+// '..b' supported by the underlying\n+// * implementation\n+// */\n+// public void setVariable(String name, Object value)\n+// throws IllegalArgumentException {\n+// Object o = xPath.getVariableContext();\n+// if (o instanceof SimpleVariableContext) {\n+// ((SimpleVariableContext)o).setVariableValue(null, name, value);\n+// }\n+// }\n+//\n+// /**\n+// * Adds a namespace definition to the list of namespaces known of\n+// * this XPath expression.\n+// * <p>\n+// * <strong>Note</strong>: In XPath, there is no such thing as a\n+// * \'default namespace\'. The empty prefix <b>always</b> resolves\n+// * to the empty namespace URI.</p>\n+// *\n+// * @param namespace the namespace.\n+// */\n+// public void addNamespace(Namespace namespace) {\n+// try {\n+// xPath.addNamespace(namespace.getPrefix(), namespace.getURI());\n+// }\n+// catch (JaxenException ex1) { /* Can\'t happen here. */ }\n+// }\n+//\n+// /**\n+// * Returns the wrapped XPath expression as a string.\n+// *\n+// * @return the wrapped XPath expression as a string.\n+// */\n+// public String getXPath() {\n+// return (xPath.toString());\n+// }\n+//\n+// /**\n+// * Compiles and sets the XPath expression wrapped by this object.\n+// *\n+// * @param expr the XPath expression to wrap.\n+// *\n+// * @throws JDOMException if the XPath expression is invalid.\n+// */\n+// private void setXPath(String expr) throws JDOMException {\n+// try {\n+// xPath = new JDOMXPath(expr);\n+// xPath.setNamespaceContext(new NSContext());\n+// }\n+// catch (Exception ex1) {\n+// throw new JDOMException(\n+// "Invalid XPath expression: \\"" + expr + "\\"", ex1);\n+// }\n+// }\n+//\n+// public String toString() {\n+// return (xPath.toString());\n+// }\n+//\n+// public boolean equals(Object o) {\n+// if (o instanceof JaxenXPath) {\n+// JaxenXPath x = (JaxenXPath)o;\n+//\n+// return (super.equals(o) &&\n+// xPath.toString().equals(x.xPath.toString()));\n+// }\n+// return false;\n+// }\n+//\n+// public int hashCode() {\n+// return xPath.hashCode();\n+// }\n+//\n+// private class NSContext extends SimpleNamespaceContext {\n+// public NSContext() {\n+// super();\n+// }\n+//\n+// /**\n+// * <i>[Jaxen NamespaceContext interface support]</i> Translates\n+// * the provided namespace prefix into the matching bound\n+// * namespace URI.\n+// *\n+// * @param prefix the namespace prefix to resolve.\n+// *\n+// * @return the namespace URI matching the prefix.\n+// */\n+// public String translateNamespacePrefixToUri(String prefix) {\n+// if ((prefix == null) || (prefix.length() == 0)) {\n+// return null;\n+// }\n+//\n+// String uri = super.translateNamespacePrefixToUri(prefix);\n+// if (uri == null) {\n+// Object ctx = currentContext;\n+// if (ctx != null) {\n+// Element elt = null;\n+//\n+// // Get closer element node\n+// if (ctx instanceof Element) {\n+// elt = (Element)ctx;\n+// } else if (ctx instanceof Attribute) {\n+// elt = ((Attribute)ctx).getParent();\n+// } else if (ctx instanceof Content) {\n+// elt = ((Content) ctx).getParentElement();\n+// } else if (ctx instanceof Document) {\n+// elt = ((Document)ctx).getRootElement();\n+// }\n+//\n+// if (elt != null) {\n+// Namespace ns = elt.getNamespace(prefix);\n+// if (ns != null) {\n+// uri = ns.getURI();\n+// }\n+// }\n+// }\n+// }\n+// return uri;\n+// }\n+// }\n+//}\n+\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/xpath/XPath.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/xpath/XPath.java Mon Nov 21 08:12:19 2011 -0500 |
[ |
b'@@ -0,0 +1,453 @@\n+/*--\n+\n+ $Id: XPath.java,v 1.17 2007/11/10 05:29:02 jhunter Exp $\n+\n+ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ 1. Redistributions of source code must retain the above copyright\n+ notice, this list of conditions, and the following disclaimer.\n+\n+ 2. Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions, and the disclaimer that follows\n+ these conditions in the documentation and/or other materials\n+ provided with the distribution.\n+\n+ 3. The name "JDOM" must not be used to endorse or promote products\n+ derived from this software without prior written permission. For\n+ written permission, please contact <request_AT_jdom_DOT_org>.\n+\n+ 4. Products derived from this software may not be called "JDOM", nor\n+ may "JDOM" appear in their name, without prior written permission\n+ from the JDOM Project Management <request_AT_jdom_DOT_org>.\n+\n+ In addition, we request (but do not require) that you include in the\n+ end-user documentation provided with the redistribution and/or in the\n+ software itself an acknowledgement equivalent to the following:\n+ "This product includes software developed by the\n+ JDOM Project (http://www.jdom.org/)."\n+ Alternatively, the acknowledgment may be graphical using the logos\n+ available at http://www.jdom.org/images/logos.\n+\n+ THIS SOFTWARE IS PROVIDED ``AS IS\'\' AND ANY EXPRESSED OR IMPLIED\n+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT\n+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ SUCH DAMAGE.\n+\n+ This software consists of voluntary contributions made by many\n+ individuals on behalf of the JDOM Project and was originally\n+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and\n+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information\n+ on the JDOM Project, please see <http://www.jdom.org/>.\n+\n+ */\n+\n+package org.jdom.xpath;\n+\n+\n+import java.io.*;\n+import java.lang.reflect.*;\n+import java.util.*;\n+\n+import org.jdom.*;\n+\n+\n+/**\n+ * A utility class for performing XPath calls on JDOM nodes, with a factory\n+ * interface for obtaining a first XPath instance. Users operate against this\n+ * class while XPath vendors can plug-in implementations underneath. Users\n+ * can choose an implementation using either {@link #setXPathClass} or\n+ * the system property "org.jdom.xpath.class".\n+ *\n+ * @version $Revision: 1.17 $, $Date: 2007/11/10 05:29:02 $\n+ * @author Laurent Bihanic\n+ */\n+public abstract class XPath implements Serializable {\n+\n+ private static final String CVS_ID =\n+ "@(#) $RCSfile: XPath.java,v $ $Revision: 1.17 $ $Date: 2007/11/10 05:29:02 $ $Name: jdom_1_1_1 $";\n+\n+ /**\n+ * The name of the system property from which to retrieve the\n+ * name of the implementation class to use.\n+ * <p>\n+ * The property name is:\n+ * "<code>org.jdom.xpath.class</code>".</p>\n+ */\n+ private final static String XPATH_CLASS_PROPERTY = "org.jdom.xpath.class";\n+\n+ /**\n+ * The default implementation class to use if none was configured.\n+ */\n+ private final static String DEFAULT_XPATH_CLASS =\n+ "org.jdom.xpath.JaxenXPath";\n+\n+ /**\n+ * The string passable to the JAXP 1.3 XPathFactory is'..b'first\n+ * entry in the list of selected nodes (or atomics).\n+ * <p>\n+ * <strong>Note</strong>: This method should not be used when the\n+ * same XPath expression needs to be applied several times (on the\n+ * same or different contexts) as it requires the expression to be\n+ * compiled before being evaluated. In such cases,\n+ * {@link #newInstance allocating} an XPath wrapper instance and\n+ * {@link #selectSingleNode(java.lang.Object) evaluating} it\n+ * several times is way more efficient.\n+ * </p>\n+ *\n+ * @param context the element to use as context for evaluating\n+ * the XPath expression.\n+ * @param path the XPath expression to evaluate.\n+ *\n+ * @return the first selected item, which may be of types: {@link Element},\n+ * {@link Attribute}, {@link Text}, {@link CDATA},\n+ * {@link Comment}, {@link ProcessingInstruction}, Boolean,\n+ * Double, String, or <code>null</code> if no item was selected.\n+ *\n+ * @throws JDOMException if the XPath expression is invalid or\n+ * its evaluation on the specified context\n+ * failed.\n+ */\n+ public static Object selectSingleNode(Object context, String path)\n+ throws JDOMException {\n+ return newInstance(path).selectSingleNode(context);\n+ }\n+\n+\n+ //-------------------------------------------------------------------------\n+ // Serialization support\n+ //-------------------------------------------------------------------------\n+\n+ /**\n+ * <i>[Serialization support]</i> Returns the alternative object\n+ * to write to the stream when serializing this object. This\n+ * method returns an instance of a dedicated nested class to\n+ * serialize XPath expressions independently of the concrete\n+ * implementation being used.\n+ * <p>\n+ * <strong>Note</strong>: Subclasses are not allowed to override\n+ * this method to ensure valid serialization of all\n+ * implementations.</p>\n+ *\n+ * @return an XPathString instance configured with the wrapped\n+ * XPath expression.\n+ *\n+ * @throws ObjectStreamException never.\n+ */\n+ protected final Object writeReplace() throws ObjectStreamException {\n+ return new XPathString(this.getXPath());\n+ }\n+\n+ /**\n+ * The XPathString is dedicated to serialize instances of\n+ * XPath subclasses in a implementation-independent manner.\n+ * <p>\n+ * XPathString ensures that only string data are serialized. Upon\n+ * deserialization, XPathString relies on XPath factory method to\n+ * to create instances of the concrete XPath wrapper currently\n+ * configured.</p>\n+ */\n+ private final static class XPathString implements Serializable {\n+ /**\n+ * The XPath expression as a string.\n+ */\n+ private String xPath = null;\n+\n+ /**\n+ * Creates a new XPathString instance from the specified\n+ * XPath expression.\n+ *\n+ * @param xpath the XPath expression.\n+ */\n+ public XPathString(String xpath) {\n+ super();\n+\n+ this.xPath = xpath;\n+ }\n+\n+ /**\n+ * <i>[Serialization support]</i> Resolves the read XPathString\n+ * objects into XPath implementations.\n+ *\n+ * @return an instance of a concrete implementation of\n+ * XPath.\n+ *\n+ * @throws ObjectStreamException if no XPath could be built\n+ * from the read object.\n+ */\n+ private Object readResolve() throws ObjectStreamException {\n+ try {\n+ return XPath.newInstance(this.xPath);\n+ }\n+ catch (JDOMException ex1) {\n+ throw new InvalidObjectException(\n+ "Can\'t create XPath object for expression \\"" +\n+ this.xPath + "\\": " + ex1.toString());\n+ }\n+ }\n+ }\n+}\n+\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/org/jdom/xpath/package.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/org/jdom/xpath/package.html Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,6 @@ +<body> + +Support for XPath from within JDOM. XPath provides a common interface with a +pluggable back-end. The default back end is Jaxen. + +</body> |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/src/xmlFilePattern.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/src/xmlFilePattern.xml Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,62 @@ +<?xml version="1.0" ?> +<SampleSet> + <NumberSamples>1</NumberSamples> + <Sample> + <SampleName>name</SampleName> + <ReadLength>0</ReadLength> + <NumberReads>0</NumberReads> + <TargetSize>0</TargetSize> + <AvTargetCoverage>0</AvTargetCoverage> + <SDTargetCoverage>0</SDTargetCoverage> + <ReadsOnTarget> + <OnTarget> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </OnTarget> + <Plus100> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </Plus100> + <Plus200> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </Plus200> + </ReadsOnTarget> + <ReadsOverlappingTarget> + <OnTarget> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </OnTarget> + <Plus100> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </Plus100> + <Plus200> + <NumberReads>0</NumberReads> + <PercReads>0</PercReads> + </Plus200> + </ReadsOverlappingTarget> + <TargetCovered> + <from1x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from1x> + <from5x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from5x> + <from10x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from10x> + <from20x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from20x> + <from30x> + <NumberBases>0</NumberBases> + <PercBases>0</PercBases> + </from30x> + </TargetCovered> + </Sample> +</SampleSet> \ No newline at end of file |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/anoGam1.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/anoGam1.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/bosTau4.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/bosTau4.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/cb3.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/cb3.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/ce4.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/ce4.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/ce6.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/ce6.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/danRer5.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/danRer5.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/danRer6.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/danRer6.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/danRer7.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/danRer7.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/dm2.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/dm2.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/dm3.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/dm3.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/galGal2.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/galGal2.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/galGal3.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/galGal3.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/hg18.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/hg18.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/hg19.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/hg19.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/mm8.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/mm8.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/mm9.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/mm9.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/panTro3.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/panTro3.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/rn3.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/rn3.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/rn4.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/rn4.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/backup-files/susScr2.txt.gz |
b |
Binary file NGSrich_0.5.5/thirdparty/backup-files/susScr2.txt.gz has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/anoGam1.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/anoGam1.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,7 @@ +chr2L 48795086 /gbdb/anoGam1/nib/chr2L.nib +chr2R 62725911 /gbdb/anoGam1/nib/chr2R.nib +chr3L 41284009 /gbdb/anoGam1/nib/chr3L.nib +chr3R 53272125 /gbdb/anoGam1/nib/chr3R.nib +chrM 15363 /gbdb/anoGam1/nib/chrM.nib +chrU 59568033 /gbdb/anoGam1/nib/chrU.nib +chrX 22145176 /gbdb/anoGam1/nib/chrX.nib |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/bosTau4.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/bosTau4.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,11900 @@\n+chr1\t161106243\t/gbdb/bosTau4/bosTau4.2bit\n+chr2\t140800416\t/gbdb/bosTau4/bosTau4.2bit\n+chr3\t127923604\t/gbdb/bosTau4/bosTau4.2bit\n+chr5\t125847759\t/gbdb/bosTau4/bosTau4.2bit\n+chr4\t124454208\t/gbdb/bosTau4/bosTau4.2bit\n+chr6\t122561022\t/gbdb/bosTau4/bosTau4.2bit\n+chr8\t116942821\t/gbdb/bosTau4/bosTau4.2bit\n+chr7\t112078216\t/gbdb/bosTau4/bosTau4.2bit\n+chr11\t110171769\t/gbdb/bosTau4/bosTau4.2bit\n+chr9\t108145351\t/gbdb/bosTau4/bosTau4.2bit\n+chr10\t106383598\t/gbdb/bosTau4/bosTau4.2bit\n+chrX\t88516663\t/gbdb/bosTau4/bosTau4.2bit\n+chr12\t85358539\t/gbdb/bosTau4/bosTau4.2bit\n+chr15\t84633453\t/gbdb/bosTau4/bosTau4.2bit\n+chr13\t84419198\t/gbdb/bosTau4/bosTau4.2bit\n+chr14\t81345643\t/gbdb/bosTau4/bosTau4.2bit\n+chr16\t77906053\t/gbdb/bosTau4/bosTau4.2bit\n+chr17\t76506943\t/gbdb/bosTau4/bosTau4.2bit\n+chr20\t75796353\t/gbdb/bosTau4/bosTau4.2bit\n+chr21\t69173390\t/gbdb/bosTau4/bosTau4.2bit\n+chr18\t66141439\t/gbdb/bosTau4/bosTau4.2bit\n+chr19\t65312493\t/gbdb/bosTau4/bosTau4.2bit\n+chr24\t65020233\t/gbdb/bosTau4/bosTau4.2bit\n+chr22\t61848140\t/gbdb/bosTau4/bosTau4.2bit\n+chr23\t53376148\t/gbdb/bosTau4/bosTau4.2bit\n+chr29\t51998940\t/gbdb/bosTau4/bosTau4.2bit\n+chr26\t51750746\t/gbdb/bosTau4/bosTau4.2bit\n+chr27\t48749334\t/gbdb/bosTau4/bosTau4.2bit\n+chr28\t46084206\t/gbdb/bosTau4/bosTau4.2bit\n+chr25\t44060403\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.1\t3546887\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.2\t2346095\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.3\t2196958\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.4\t1827879\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.5\t1667370\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.6\t1456232\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.7\t1284506\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.8\t1221492\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.9\t1190529\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.10\t1137730\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11\t1114776\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.12\t998484\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.13\t870761\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.14\t855941\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.15\t834570\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.16\t832387\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.17\t829265\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.18\t814724\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.19\t812995\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.20\t789248\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.21\t763971\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.22\t738377\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.23\t698114\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.24\t691804\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.25\t691051\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.26\t685649\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.27\t675210\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.28\t672366\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.29\t662952\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.30\t661155\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.31\t660698\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.32\t649628\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.33\t635995\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.34\t628163\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.35\t624422\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.36\t622436\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.37\t622408\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.38\t605721\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.39\t581943\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.40\t578006\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.41\t574489\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.42\t573429\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.43\t558548\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.44\t546915\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.45\t539620\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.46\t511300\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.47\t508129\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.48\t503446\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.49\t502438\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.50\t499685\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.51\t495720\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.52\t492991\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.53\t488077\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.54\t466057\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.55\t461126\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.56\t459452\t/gbdb/bosTau4/bosTau4.2bi'..b'49\t1028\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11750\t1028\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11751\t1027\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11752\t1027\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11753\t1026\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11754\t1026\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11755\t1026\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11756\t1026\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11757\t1026\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11758\t1026\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11759\t1025\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11760\t1024\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11761\t1024\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11762\t1023\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11763\t1023\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11764\t1023\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11765\t1023\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11766\t1023\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11767\t1023\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11768\t1023\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11769\t1022\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11770\t1021\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11771\t1021\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11772\t1021\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11773\t1021\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11774\t1021\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11775\t1021\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11776\t1020\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11777\t1019\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11778\t1018\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11779\t1017\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11780\t1017\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11781\t1016\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11782\t1016\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11783\t1016\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11784\t1016\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11785\t1015\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11786\t1015\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11787\t1014\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11788\t1013\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11789\t1013\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11790\t1013\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11791\t1013\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11792\t1012\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11793\t1012\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11794\t1012\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11795\t1012\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11796\t1011\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11797\t1011\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11798\t1011\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11799\t1010\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11800\t1009\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11801\t1009\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11802\t1009\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11803\t1009\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11804\t1008\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11805\t1008\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11806\t1006\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11807\t1006\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11808\t1006\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11809\t1006\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11810\t1006\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11811\t1005\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11812\t1005\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11813\t1005\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11814\t1004\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11815\t1004\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11816\t1003\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11817\t1003\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11818\t1003\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11819\t1002\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11820\t1002\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11821\t1001\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11822\t1001\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11823\t1000\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11824\t1000\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11825\t1000\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11826\t999\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11827\t999\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11828\t999\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11829\t999\t/gbdb/bosTau4/bosTau4.2bit\n+chrUn.004.11830\t999\t/gbdb/bosTau4/bosTau4.2bit\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/cb3.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/cb3.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,13 @@ +chrI 11274843 /gbdb/cb3/cb3.2bit +chrII 14512975 /gbdb/cb3/cb3.2bit +chrIII 13544562 /gbdb/cb3/cb3.2bit +chrIII_random 864856 /gbdb/cb3/cb3.2bit +chrII_random 2252910 /gbdb/cb3/cb3.2bit +chrIV 15290274 /gbdb/cb3/cb3.2bit +chrIV_random 751081 /gbdb/cb3/cb3.2bit +chrI_random 3509021 /gbdb/cb3/cb3.2bit +chrUn 7311690 /gbdb/cb3/cb3.2bit +chrV 16004101 /gbdb/cb3/cb3.2bit +chrV_random 2554181 /gbdb/cb3/cb3.2bit +chrX 20608032 /gbdb/cb3/cb3.2bit +chrM 14420 /gbdb/cb3/cb3.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/ce4.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/ce4.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,7 @@ +chrI 15072419 /gbdb/ce4/ce4.2bit +chrII 15279316 /gbdb/ce4/ce4.2bit +chrIII 13783681 /gbdb/ce4/ce4.2bit +chrIV 17493784 /gbdb/ce4/ce4.2bit +chrM 13794 /gbdb/ce4/ce4.2bit +chrV 20919398 /gbdb/ce4/ce4.2bit +chrX 17718852 /gbdb/ce4/ce4.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/ce6.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/ce6.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,7 @@ +chrV 20919568 /gbdb/ce6/ce6.2bit +chrX 17718854 /gbdb/ce6/ce6.2bit +chrIV 17493785 /gbdb/ce6/ce6.2bit +chrII 15279323 /gbdb/ce6/ce6.2bit +chrI 15072421 /gbdb/ce6/ce6.2bit +chrIII 13783681 /gbdb/ce6/ce6.2bit +chrM 13794 /gbdb/ce6/ce6.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/danRer5.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/danRer5.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,5036 @@\n+chr5\t70371393\t/gbdb/danRer5/danRer5.2bit\n+chr7\t70262009\t/gbdb/danRer5/danRer5.2bit\n+chr3\t62931207\t/gbdb/danRer5/danRer5.2bit\n+chr6\t59200669\t/gbdb/danRer5/danRer5.2bit\n+chr20\t56528676\t/gbdb/danRer5/danRer5.2bit\n+chr14\t56522864\t/gbdb/danRer5/danRer5.2bit\n+chr8\t56456705\t/gbdb/danRer5/danRer5.2bit\n+chr1\t56204684\t/gbdb/danRer5/danRer5.2bit\n+chr2\t54366722\t/gbdb/danRer5/danRer5.2bit\n+chr13\t53547397\t/gbdb/danRer5/danRer5.2bit\n+chr16\t53070661\t/gbdb/danRer5/danRer5.2bit\n+chr17\t52310423\t/gbdb/danRer5/danRer5.2bit\n+chr9\t51490918\t/gbdb/danRer5/danRer5.2bit\n+chr18\t49281368\t/gbdb/danRer5/danRer5.2bit\n+chr12\t47523734\t/gbdb/danRer5/danRer5.2bit\n+chr15\t46629432\t/gbdb/danRer5/danRer5.2bit\n+chr23\t46388020\t/gbdb/danRer5/danRer5.2bit\n+chr19\t46181231\t/gbdb/danRer5/danRer5.2bit\n+chr21\t46057314\t/gbdb/danRer5/danRer5.2bit\n+chr11\t44616367\t/gbdb/danRer5/danRer5.2bit\n+chr4\t42602441\t/gbdb/danRer5/danRer5.2bit\n+chr10\t42379582\t/gbdb/danRer5/danRer5.2bit\n+chr24\t40293347\t/gbdb/danRer5/danRer5.2bit\n+chr22\t38981829\t/gbdb/danRer5/danRer5.2bit\n+chr25\t32876240\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2558\t2492985\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2487\t2490681\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2561\t1518658\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2559\t1317754\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2536\t854719\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2498\t818287\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2643\t682458\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2490\t634744\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2492\t601617\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2623\t562554\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2\t531032\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA240\t523564\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA465\t519282\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2551\t510381\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA65\t507785\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA538\t504980\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA72\t497427\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2593\t481448\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA53\t479688\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2532\t442274\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2543\t436318\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2570\t432419\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2631\t411754\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA470\t411571\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA291\t411167\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA746\t410814\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2619\t402087\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2632\t399669\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA289\t382333\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2524\t377760\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2547\t377245\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA592\t376255\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA58\t367219\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA924\t366698\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA743\t358713\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA737\t356673\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2628\t352938\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA395\t352853\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA724\t352180\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA725\t351949\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA122\t350329\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2553\t348507\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2586\t346401\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2640\t334594\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA6\t333456\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA74\t330246\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2529\t327850\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA354\t327159\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2648\t324104\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2602\t324053\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2597\t322408\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA643\t321130\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA259\t317389\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2512\t316215\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA695\t314564\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2596\t314031\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA681\t310961\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2645\t309079\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA8\t306107\t/gbdb/danRer5/danRer5.2bit\n+Zv7_scaffold2514\t302962\t/gbdb/danRer5/danRer5.2b'..b'7_NA6567\t2035\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA726\t2035\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7739\t2035\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1276\t2034\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1541\t2034\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2187\t2034\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4109\t2034\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2616\t2033\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4023\t2033\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4190\t2033\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4324\t2033\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7373\t2033\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2066\t2032\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA5301\t2032\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1246\t2030\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1934\t2029\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA6324\t2029\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA6332\t2029\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7616\t2029\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2974\t2028\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3912\t2028\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7004\t2028\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7618\t2028\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7711\t2027\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1325\t2026\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1917\t2026\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2804\t2026\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4160\t2026\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2883\t2025\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3495\t2024\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4173\t2023\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4327\t2023\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2278\t2022\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3542\t2022\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4271\t2022\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2517\t2021\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2534\t2021\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3427\t2021\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3457\t2021\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7389\t2021\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1851\t2020\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4683\t2020\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA6311\t2020\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3990\t2019\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3926\t2018\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4412\t2017\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA495\t2017\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7637\t2016\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3875\t2015\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3921\t2015\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA6205\t2015\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2840\t2014\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4961\t2014\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7447\t2014\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4396\t2013\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4929\t2013\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA6113\t2013\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4900\t2012\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7548\t2012\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2728\t2010\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4270\t2010\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2677\t2009\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA6733\t2009\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1544\t2008\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2731\t2008\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1937\t2007\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2440\t2007\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA5765\t2007\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA6991\t2007\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3686\t2006\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4025\t2006\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4956\t2006\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA5550\t2006\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7269\t2006\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7382\t2006\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA7682\t2006\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3720\t2005\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4776\t2005\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2705\t2004\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA3538\t2004\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1234\t2003\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2544\t2003\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2627\t2003\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2720\t2003\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA4748\t2003\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1523\t2002\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1533\t2002\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2719\t2002\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA2729\t2001\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA1247\t2000\t/gbdb/danRer5/danRer5.2bit\n+Zv7_NA5415\t2000\t/gbdb/danRer5/danRer5.2bit\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/danRer6.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/danRer6.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,11724 @@\n+chr7\t76918211\t/gbdb/danRer6/danRer6.2bit\n+chr5\t74451498\t/gbdb/danRer6/danRer6.2bit\n+chr4\t71658100\t/gbdb/danRer6/danRer6.2bit\n+chr6\t61647013\t/gbdb/danRer6/danRer6.2bit\n+chr3\t60907308\t/gbdb/danRer6/danRer6.2bit\n+chr1\t59305620\t/gbdb/danRer6/danRer6.2bit\n+chr2\t58009534\t/gbdb/danRer6/danRer6.2bit\n+chr8\t55568185\t/gbdb/danRer6/danRer6.2bit\n+chr9\t54736511\t/gbdb/danRer6/danRer6.2bit\n+chr14\t52930158\t/gbdb/danRer6/danRer6.2bit\n+chr16\t51890894\t/gbdb/danRer6/danRer6.2bit\n+chr20\t51884995\t/gbdb/danRer6/danRer6.2bit\n+chr13\t50748729\t/gbdb/danRer6/danRer6.2bit\n+chr17\t49469313\t/gbdb/danRer6/danRer6.2bit\n+chr18\t49271716\t/gbdb/danRer6/danRer6.2bit\n+chr19\t48708673\t/gbdb/danRer6/danRer6.2bit\n+chr21\t47572505\t/gbdb/danRer6/danRer6.2bit\n+chr15\t47237297\t/gbdb/danRer6/danRer6.2bit\n+chr12\t46853116\t/gbdb/danRer6/danRer6.2bit\n+chr23\t44714728\t/gbdb/danRer6/danRer6.2bit\n+chr11\t44116856\t/gbdb/danRer6/danRer6.2bit\n+chr10\t43467561\t/gbdb/danRer6/danRer6.2bit\n+chr22\t41415389\t/gbdb/danRer6/danRer6.2bit\n+chr24\t40403431\t/gbdb/danRer6/danRer6.2bit\n+chr25\t38768535\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold464\t2604789\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1585\t2015512\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold32\t1305644\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold477\t964789\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1242\t809594\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3025\t794780\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold803\t782640\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold2292\t779331\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3117\t777796\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1746\t689110\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1026\t657781\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1983\t613609\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold786\t597906\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold955\t593455\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold432\t556279\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold667\t549754\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1453\t547950\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3059\t537443\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3028\t519547\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3016\t483285\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3041\t471087\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3062\t462670\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold207\t457989\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA3584\t427969\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold2633\t413475\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6036\t409760\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3077\t407901\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1380\t400064\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3049\t396897\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3035\t389258\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3027\t384923\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3085\t383920\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold2198\t381172\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3123\t375588\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold2521\t373446\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold420\t371247\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold2578\t369303\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1149\t362163\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA4819\t360952\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold977\t354978\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3106\t351597\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1395\t350512\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold1261\t345956\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA3328\t341385\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold282\t340764\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3050\t338251\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3029\t335883\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA3748\t331185\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold2796\t323037\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3127\t321032\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold872\t319267\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3020\t316424\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3084\t314974\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1968\t314389\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold2917\t314369\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold3112\t314093\t/gbdb/danRer6/danRer6.2bit\n+Zv8_scaffold956\t313376\t/gbdb/danRer6/danRer6.2bit\n+Zv'..b'005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6874\t2005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6985\t2005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA7007\t2005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA7283\t2005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8126\t2005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8814\t2005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8882\t2005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9819\t2005\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA161\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1698\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA236\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA2795\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA2890\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA3204\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA38\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA4240\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA4405\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA5300\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6511\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6871\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA7592\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA815\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8376\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9708\t2004\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1070\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA11081\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA11096\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA11241\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1369\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1866\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA3372\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA4357\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA5152\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6938\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA7781\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA7792\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8597\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8860\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9882\t2003\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1050\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10535\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1155\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA1875\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA250\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA3362\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA3371\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8239\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8891\t2002\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10066\t2001\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA4760\t2001\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA5424\t2001\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6044\t2001\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6559\t2001\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6701\t2001\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA7162\t2001\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8411\t2001\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10004\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10497\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10518\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10533\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10667\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10923\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10970\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA10997\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA11020\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA11176\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA11393\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA2881\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA3180\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA341\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA398\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA4833\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA5235\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA5342\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6090\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA6924\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA7204\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA7870\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8173\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8183\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8193\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8225\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8301\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA8791\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9068\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9122\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9604\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9751\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9892\t2000\t/gbdb/danRer6/danRer6.2bit\n+Zv8_NA9916\t2000\t/gbdb/danRer6/danRer6.2bit\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/danRer7.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/danRer7.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,1133 @@\n+chr7\t77276063\t/gbdb/danRer7/danRer7.2bit\n+chr5\t75682077\t/gbdb/danRer7/danRer7.2bit\n+chr3\t63268876\t/gbdb/danRer7/danRer7.2bit\n+chr4\t62094675\t/gbdb/danRer7/danRer7.2bit\n+chr1\t60348388\t/gbdb/danRer7/danRer7.2bit\n+chr2\t60300536\t/gbdb/danRer7/danRer7.2bit\n+chr6\t59938731\t/gbdb/danRer7/danRer7.2bit\n+chr16\t58780683\t/gbdb/danRer7/danRer7.2bit\n+chr9\t58232459\t/gbdb/danRer7/danRer7.2bit\n+chr8\t56184765\t/gbdb/danRer7/danRer7.2bit\n+chr20\t55952140\t/gbdb/danRer7/danRer7.2bit\n+chr13\t54093808\t/gbdb/danRer7/danRer7.2bit\n+chr17\t53984731\t/gbdb/danRer7/danRer7.2bit\n+chr14\t53733891\t/gbdb/danRer7/danRer7.2bit\n+chr12\t50697278\t/gbdb/danRer7/danRer7.2bit\n+chr19\t50254551\t/gbdb/danRer7/danRer7.2bit\n+chr18\t49877488\t/gbdb/danRer7/danRer7.2bit\n+chr15\t47442429\t/gbdb/danRer7/danRer7.2bit\n+chr11\t46661319\t/gbdb/danRer7/danRer7.2bit\n+chr10\t46591166\t/gbdb/danRer7/danRer7.2bit\n+chr23\t46386876\t/gbdb/danRer7/danRer7.2bit\n+chr21\t44544065\t/gbdb/danRer7/danRer7.2bit\n+chr24\t43947580\t/gbdb/danRer7/danRer7.2bit\n+chr22\t42261000\t/gbdb/danRer7/danRer7.2bit\n+chr25\t38499472\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3530\t1544009\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3503\t965101\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3463\t664565\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3471\t638129\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3455\t543129\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3518\t504410\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3465\t500345\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3520\t436282\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3470\t425063\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3459\t417943\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3480\t407754\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3536\t368818\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3473\t352305\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3545\t351865\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3498\t343018\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3485\t341688\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3554\t332968\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3535\t329156\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3495\t321770\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA675\t312116\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3551\t306644\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3461\t302948\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3548\t301592\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3563\t295849\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3477\t292984\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3491\t284732\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3482\t283152\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3540\t281342\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3510\t279262\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3539\t276747\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3515\t276154\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3500\t271256\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3509\t266362\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3547\t260465\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3538\t253640\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3456\t253302\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA672\t248473\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3550\t245711\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3533\t242772\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA849\t242593\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3492\t236140\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3494\t233193\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3487\t231704\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3517\t225600\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3514\t225481\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3462\t224830\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3458\t223119\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA722\t221151\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3488\t217805\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3483\t213343\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3529\t212462\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3506\t210931\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3534\t206488\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA372\t206081\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3561\t204746\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3453\t203829\t/gbdb/danRer7/danRer7.2bit\n+Zv9_scaffold3486\t202621\t/gbdb/danRe'..b'7.2bit\n+Zv9_NA478\t6919\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA886\t6767\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA862\t6736\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA931\t6731\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA985\t6726\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA967\t6697\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA180\t6675\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA50\t6674\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA890\t6597\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA288\t6556\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA684\t6489\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA6\t6378\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA371\t6328\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA925\t6296\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA119\t6288\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA750\t6274\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA411\t6273\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA861\t6161\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA939\t6107\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA260\t5952\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA705\t5946\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA108\t5702\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA843\t5690\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA188\t5676\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA347\t5663\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA666\t5580\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA7\t5401\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA539\t5114\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA884\t4454\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA18\t4371\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA987\t4206\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA978\t3784\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA157\t3679\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA334\t3679\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA891\t3607\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA902\t3484\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA920\t3455\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA877\t3381\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA796\t3298\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA945\t3228\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA946\t3086\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA949\t3033\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA933\t3012\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA951\t2975\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA957\t2866\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA971\t2865\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA960\t2671\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA954\t2620\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA912\t2460\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA712\t2434\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA961\t2357\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA988\t2311\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA977\t2246\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA932\t2185\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA993\t2100\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA943\t2065\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA462\t2052\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA919\t2001\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA165\t1990\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA955\t1989\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA956\t1989\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA989\t1920\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA982\t1919\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA983\t1919\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA909\t1916\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA980\t1872\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA969\t1853\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA981\t1813\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA901\t1786\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA950\t1755\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA984\t1745\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA962\t1732\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA935\t1714\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA976\t1692\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA986\t1639\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA953\t1633\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA941\t1591\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA929\t1577\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA936\t1530\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA975\t1452\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA958\t1428\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA212\t1347\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA979\t1346\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA952\t1326\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA934\t1266\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA944\t1251\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA745\t1198\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA968\t1173\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA959\t1142\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA937\t1137\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA802\t1126\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA1000\t942\t/gbdb/danRer7/danRer7.2bit\n+Zv9_NA997\t650\t/gbdb/danRer7/danRer7.2bit\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/dm2.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/dm2.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,13 @@ +chr4 1281640 /gbdb/dm2/nib/chr4.nib +chrM 19517 /gbdb/dm2/nib/chrM.nib +chrU 8724946 /gbdb/dm2/nib/chrU.nib +chrX 22224390 /gbdb/dm2/nib/chrX.nib +chr2L 22407834 /gbdb/dm2/nib/chr2L.nib +chr2R 20766785 /gbdb/dm2/nib/chr2R.nib +chr2h 1694122 /gbdb/dm2/nib/chr2h.nib +chr3L 23771897 /gbdb/dm2/nib/chr3L.nib +chr3R 27905053 /gbdb/dm2/nib/chr3R.nib +chr3h 2955737 /gbdb/dm2/nib/chr3h.nib +chr4h 88110 /gbdb/dm2/nib/chr4h.nib +chrXh 359526 /gbdb/dm2/nib/chrXh.nib +chrYh 396896 /gbdb/dm2/nib/chrYh.nib |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/dm3.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/dm3.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,15 @@ +chr2L 23011544 /gbdb/dm3/dm3.2bit +chr2LHet 368872 /gbdb/dm3/dm3.2bit +chr2R 21146708 /gbdb/dm3/dm3.2bit +chr2RHet 3288761 /gbdb/dm3/dm3.2bit +chr3L 24543557 /gbdb/dm3/dm3.2bit +chr3LHet 2555491 /gbdb/dm3/dm3.2bit +chr3R 27905053 /gbdb/dm3/dm3.2bit +chr3RHet 2517507 /gbdb/dm3/dm3.2bit +chr4 1351857 /gbdb/dm3/dm3.2bit +chrU 10049037 /gbdb/dm3/dm3.2bit +chrUextra 29004656 /gbdb/dm3/dm3.2bit +chrX 22422827 /gbdb/dm3/dm3.2bit +chrXHet 204112 /gbdb/dm3/dm3.2bit +chrYHet 347038 /gbdb/dm3/dm3.2bit +chrM 19517 /gbdb/dm3/dm3.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/galGal2.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/galGal2.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,54 @@ +chr1 188239860 /gbdb/galGal2/nib/chr1.nib +chr1_random 1356957 /gbdb/galGal2/nib/chr1_random.nib +chr10 20909726 /gbdb/galGal2/nib/chr10.nib +chr10_random 3871218 /gbdb/galGal2/nib/chr10_random.nib +chr11 19020054 /gbdb/galGal2/nib/chr11.nib +chr11_random 1153135 /gbdb/galGal2/nib/chr11_random.nib +chr12 19821895 /gbdb/galGal2/nib/chr12.nib +chr13 17279963 /gbdb/galGal2/nib/chr13.nib +chr13_random 1219686 /gbdb/galGal2/nib/chr13_random.nib +chr14 20603938 /gbdb/galGal2/nib/chr14.nib +chr15 12438626 /gbdb/galGal2/nib/chr15.nib +chr16 239457 /gbdb/galGal2/nib/chr16.nib +chr16_random 1085578 /gbdb/galGal2/nib/chr16_random.nib +chr17 10632206 /gbdb/galGal2/nib/chr17.nib +chr18 8919268 /gbdb/galGal2/nib/chr18.nib +chr19 9463882 /gbdb/galGal2/nib/chr19.nib +chr2 147590765 /gbdb/galGal2/nib/chr2.nib +chr2_random 125104 /gbdb/galGal2/nib/chr2_random.nib +chr20 13506680 /gbdb/galGal2/nib/chr20.nib +chr21 6202554 /gbdb/galGal2/nib/chr21.nib +chr22 2228820 /gbdb/galGal2/nib/chr22.nib +chr23 5666127 /gbdb/galGal2/nib/chr23.nib +chr24 5910111 /gbdb/galGal2/nib/chr24.nib +chr24_random 149561 /gbdb/galGal2/nib/chr24_random.nib +chr26 4255270 /gbdb/galGal2/nib/chr26.nib +chr27 2668888 /gbdb/galGal2/nib/chr27.nib +chr27_random 721164 /gbdb/galGal2/nib/chr27_random.nib +chr28 4731479 /gbdb/galGal2/nib/chr28.nib +chr28_random 6240 /gbdb/galGal2/nib/chr28_random.nib +chr3 108638738 /gbdb/galGal2/nib/chr3.nib +chr3_random 1636275 /gbdb/galGal2/nib/chr3_random.nib +chr32 1018878 /gbdb/galGal2/nib/chr32.nib +chr32_random 61160 /gbdb/galGal2/nib/chr32_random.nib +chr4 90634903 /gbdb/galGal2/nib/chr4.nib +chr4_random 1174127 /gbdb/galGal2/nib/chr4_random.nib +chr5 56310377 /gbdb/galGal2/nib/chr5.nib +chr5_random 54865 /gbdb/galGal2/nib/chr5_random.nib +chr6 33893787 /gbdb/galGal2/nib/chr6.nib +chr6_random 3628 /gbdb/galGal2/nib/chr6_random.nib +chr7 37338262 /gbdb/galGal2/nib/chr7.nib +chr7_random 2315 /gbdb/galGal2/nib/chr7_random.nib +chr8 30024636 /gbdb/galGal2/nib/chr8.nib +chr8_random 15783 /gbdb/galGal2/nib/chr8_random.nib +chr9 23409228 /gbdb/galGal2/nib/chr9.nib +chrE22C19W28 70504 /gbdb/galGal2/nib/chrE22C19W28.nib +chrE26C13 231937 /gbdb/galGal2/nib/chrE26C13.nib +chrE50C23 21569 /gbdb/galGal2/nib/chrE50C23.nib +chrE64 1525 /gbdb/galGal2/nib/chrE64.nib +chrM 16775 /gbdb/galGal2/nib/chrM.nib +chrUn 165033910 /gbdb/galGal2/nib/chrUn.nib +chrW 4916845 /gbdb/galGal2/nib/chrW.nib +chrW_random 455598 /gbdb/galGal2/nib/chrW_random.nib +chrZ 33651169 /gbdb/galGal2/nib/chrZ.nib +chrZ_random 14994570 /gbdb/galGal2/nib/chrZ_random.nib |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/galGal3.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/galGal3.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,57 @@ +chr1 200994015 /gbdb/galGal3/galGal3.2bit +chr1_random 222095 /gbdb/galGal3/galGal3.2bit +chr10 22556432 /gbdb/galGal3/galGal3.2bit +chr10_random 13679 /gbdb/galGal3/galGal3.2bit +chr11 21928095 /gbdb/galGal3/galGal3.2bit +chr11_random 72667 /gbdb/galGal3/galGal3.2bit +chr12 20536687 /gbdb/galGal3/galGal3.2bit +chr12_random 7060 /gbdb/galGal3/galGal3.2bit +chr13 18911934 /gbdb/galGal3/galGal3.2bit +chr13_random 35775 /gbdb/galGal3/galGal3.2bit +chr14 15819469 /gbdb/galGal3/galGal3.2bit +chr15 12968165 /gbdb/galGal3/galGal3.2bit +chr16 432983 /gbdb/galGal3/galGal3.2bit +chr16_random 246252 /gbdb/galGal3/galGal3.2bit +chr17 11182526 /gbdb/galGal3/galGal3.2bit +chr17_random 2911 /gbdb/galGal3/galGal3.2bit +chr18 10925261 /gbdb/galGal3/galGal3.2bit +chr18_random 11891 /gbdb/galGal3/galGal3.2bit +chr19 9939723 /gbdb/galGal3/galGal3.2bit +chr2 154873767 /gbdb/galGal3/galGal3.2bit +chr2_random 142837 /gbdb/galGal3/galGal3.2bit +chr20 13986235 /gbdb/galGal3/galGal3.2bit +chr20_random 75095 /gbdb/galGal3/galGal3.2bit +chr21 6959642 /gbdb/galGal3/galGal3.2bit +chr22 3936574 /gbdb/galGal3/galGal3.2bit +chr22_random 156216 /gbdb/galGal3/galGal3.2bit +chr23 6042217 /gbdb/galGal3/galGal3.2bit +chr24 6400109 /gbdb/galGal3/galGal3.2bit +chr25 2031799 /gbdb/galGal3/galGal3.2bit +chr25_random 80372 /gbdb/galGal3/galGal3.2bit +chr26 5102438 /gbdb/galGal3/galGal3.2bit +chr27 4841970 /gbdb/galGal3/galGal3.2bit +chr28 4512026 /gbdb/galGal3/galGal3.2bit +chr28_random 105415 /gbdb/galGal3/galGal3.2bit +chr3 113657789 /gbdb/galGal3/galGal3.2bit +chr32 1028 /gbdb/galGal3/galGal3.2bit +chr4 94230402 /gbdb/galGal3/galGal3.2bit +chr4_random 180706 /gbdb/galGal3/galGal3.2bit +chr5 62238931 /gbdb/galGal3/galGal3.2bit +chr5_random 27907 /gbdb/galGal3/galGal3.2bit +chr6 37400442 /gbdb/galGal3/galGal3.2bit +chr6_random 34212 /gbdb/galGal3/galGal3.2bit +chr7 38384769 /gbdb/galGal3/galGal3.2bit +chr7_random 104000 /gbdb/galGal3/galGal3.2bit +chr8 30671729 /gbdb/galGal3/galGal3.2bit +chr8_random 420759 /gbdb/galGal3/galGal3.2bit +chr9 25554352 /gbdb/galGal3/galGal3.2bit +chrE22C19W28_E50C23 895237 /gbdb/galGal3/galGal3.2bit +chrE22C19W28_E50C23_random 191099 /gbdb/galGal3/galGal3.2bit +chrE64 49846 /gbdb/galGal3/galGal3.2bit +chrE64_random 557643 /gbdb/galGal3/galGal3.2bit +chrM 16775 /gbdb/galGal3/galGal3.2bit +chrUn_random 63870806 /gbdb/galGal3/galGal3.2bit +chrW 259642 /gbdb/galGal3/galGal3.2bit +chrW_random 729481 /gbdb/galGal3/galGal3.2bit +chrZ 74602320 /gbdb/galGal3/galGal3.2bit +chrZ_random 346234 /gbdb/galGal3/galGal3.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/hg18.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/hg18.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,49 @@ +chr1 247249719 /gbdb/hg18/nib/chr1.nib +chr1_random 1663265 /gbdb/hg18/nib/chr1_random.nib +chr10 135374737 /gbdb/hg18/nib/chr10.nib +chr10_random 113275 /gbdb/hg18/nib/chr10_random.nib +chr11 134452384 /gbdb/hg18/nib/chr11.nib +chr11_random 215294 /gbdb/hg18/nib/chr11_random.nib +chr12 132349534 /gbdb/hg18/nib/chr12.nib +chr13 114142980 /gbdb/hg18/nib/chr13.nib +chr13_random 186858 /gbdb/hg18/nib/chr13_random.nib +chr14 106368585 /gbdb/hg18/nib/chr14.nib +chr15 100338915 /gbdb/hg18/nib/chr15.nib +chr15_random 784346 /gbdb/hg18/nib/chr15_random.nib +chr16 88827254 /gbdb/hg18/nib/chr16.nib +chr16_random 105485 /gbdb/hg18/nib/chr16_random.nib +chr17 78774742 /gbdb/hg18/nib/chr17.nib +chr17_random 2617613 /gbdb/hg18/nib/chr17_random.nib +chr18 76117153 /gbdb/hg18/nib/chr18.nib +chr18_random 4262 /gbdb/hg18/nib/chr18_random.nib +chr19 63811651 /gbdb/hg18/nib/chr19.nib +chr19_random 301858 /gbdb/hg18/nib/chr19_random.nib +chr2 242951149 /gbdb/hg18/nib/chr2.nib +chr2_random 185571 /gbdb/hg18/nib/chr2_random.nib +chr20 62435964 /gbdb/hg18/nib/chr20.nib +chr21 46944323 /gbdb/hg18/nib/chr21.nib +chr21_random 1679693 /gbdb/hg18/nib/chr21_random.nib +chr22 49691432 /gbdb/hg18/nib/chr22.nib +chr22_random 257318 /gbdb/hg18/nib/chr22_random.nib +chr22_h2_hap1 63661 /gbdb/hg18/nib/chr22_h2_hap1.nib +chr3 199501827 /gbdb/hg18/nib/chr3.nib +chr3_random 749256 /gbdb/hg18/nib/chr3_random.nib +chr4 191273063 /gbdb/hg18/nib/chr4.nib +chr4_random 842648 /gbdb/hg18/nib/chr4_random.nib +chr5 180857866 /gbdb/hg18/nib/chr5.nib +chr5_random 143687 /gbdb/hg18/nib/chr5_random.nib +chr5_h2_hap1 1794870 /gbdb/hg18/nib/chr5_h2_hap1.nib +chr6 170899992 /gbdb/hg18/nib/chr6.nib +chr6_random 1875562 /gbdb/hg18/nib/chr6_random.nib +chr6_cox_hap1 4731698 /gbdb/hg18/nib/chr6_cox_hap1.nib +chr6_qbl_hap2 4565931 /gbdb/hg18/nib/chr6_qbl_hap2.nib +chr7 158821424 /gbdb/hg18/nib/chr7.nib +chr7_random 549659 /gbdb/hg18/nib/chr7_random.nib +chr8 146274826 /gbdb/hg18/nib/chr8.nib +chr8_random 943810 /gbdb/hg18/nib/chr8_random.nib +chr9 140273252 /gbdb/hg18/nib/chr9.nib +chr9_random 1146434 /gbdb/hg18/nib/chr9_random.nib +chrM 16571 /gbdb/hg18/nib/chrM.nib +chrX 154913754 /gbdb/hg18/nib/chrX.nib +chrX_random 1719168 /gbdb/hg18/nib/chrX_random.nib +chrY 57772954 /gbdb/hg18/nib/chrY.nib |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/hg19.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/hg19.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,93 @@ +chr1 249250621 /gbdb/hg19/hg19.2bit +chr2 243199373 /gbdb/hg19/hg19.2bit +chr3 198022430 /gbdb/hg19/hg19.2bit +chr4 191154276 /gbdb/hg19/hg19.2bit +chr5 180915260 /gbdb/hg19/hg19.2bit +chr6 171115067 /gbdb/hg19/hg19.2bit +chr7 159138663 /gbdb/hg19/hg19.2bit +chrX 155270560 /gbdb/hg19/hg19.2bit +chr8 146364022 /gbdb/hg19/hg19.2bit +chr9 141213431 /gbdb/hg19/hg19.2bit +chr10 135534747 /gbdb/hg19/hg19.2bit +chr11 135006516 /gbdb/hg19/hg19.2bit +chr12 133851895 /gbdb/hg19/hg19.2bit +chr13 115169878 /gbdb/hg19/hg19.2bit +chr14 107349540 /gbdb/hg19/hg19.2bit +chr15 102531392 /gbdb/hg19/hg19.2bit +chr16 90354753 /gbdb/hg19/hg19.2bit +chr17 81195210 /gbdb/hg19/hg19.2bit +chr18 78077248 /gbdb/hg19/hg19.2bit +chr20 63025520 /gbdb/hg19/hg19.2bit +chrY 59373566 /gbdb/hg19/hg19.2bit +chr19 59128983 /gbdb/hg19/hg19.2bit +chr22 51304566 /gbdb/hg19/hg19.2bit +chr21 48129895 /gbdb/hg19/hg19.2bit +chr6_ssto_hap7 4928567 /gbdb/hg19/hg19.2bit +chr6_mcf_hap5 4833398 /gbdb/hg19/hg19.2bit +chr6_cox_hap2 4795371 /gbdb/hg19/hg19.2bit +chr6_mann_hap4 4683263 /gbdb/hg19/hg19.2bit +chr6_apd_hap1 4622290 /gbdb/hg19/hg19.2bit +chr6_qbl_hap6 4611984 /gbdb/hg19/hg19.2bit +chr6_dbb_hap3 4610396 /gbdb/hg19/hg19.2bit +chr17_ctg5_hap1 1680828 /gbdb/hg19/hg19.2bit +chr4_ctg9_hap1 590426 /gbdb/hg19/hg19.2bit +chr1_gl000192_random 547496 /gbdb/hg19/hg19.2bit +chrUn_gl000225 211173 /gbdb/hg19/hg19.2bit +chr4_gl000194_random 191469 /gbdb/hg19/hg19.2bit +chr4_gl000193_random 189789 /gbdb/hg19/hg19.2bit +chr9_gl000200_random 187035 /gbdb/hg19/hg19.2bit +chrUn_gl000222 186861 /gbdb/hg19/hg19.2bit +chrUn_gl000212 186858 /gbdb/hg19/hg19.2bit +chr7_gl000195_random 182896 /gbdb/hg19/hg19.2bit +chrUn_gl000223 180455 /gbdb/hg19/hg19.2bit +chrUn_gl000224 179693 /gbdb/hg19/hg19.2bit +chrUn_gl000219 179198 /gbdb/hg19/hg19.2bit +chr17_gl000205_random 174588 /gbdb/hg19/hg19.2bit +chrUn_gl000215 172545 /gbdb/hg19/hg19.2bit +chrUn_gl000216 172294 /gbdb/hg19/hg19.2bit +chrUn_gl000217 172149 /gbdb/hg19/hg19.2bit +chr9_gl000199_random 169874 /gbdb/hg19/hg19.2bit +chrUn_gl000211 166566 /gbdb/hg19/hg19.2bit +chrUn_gl000213 164239 /gbdb/hg19/hg19.2bit +chrUn_gl000220 161802 /gbdb/hg19/hg19.2bit +chrUn_gl000218 161147 /gbdb/hg19/hg19.2bit +chr19_gl000209_random 159169 /gbdb/hg19/hg19.2bit +chrUn_gl000221 155397 /gbdb/hg19/hg19.2bit +chrUn_gl000214 137718 /gbdb/hg19/hg19.2bit +chrUn_gl000228 129120 /gbdb/hg19/hg19.2bit +chrUn_gl000227 128374 /gbdb/hg19/hg19.2bit +chr1_gl000191_random 106433 /gbdb/hg19/hg19.2bit +chr19_gl000208_random 92689 /gbdb/hg19/hg19.2bit +chr9_gl000198_random 90085 /gbdb/hg19/hg19.2bit +chr17_gl000204_random 81310 /gbdb/hg19/hg19.2bit +chrUn_gl000233 45941 /gbdb/hg19/hg19.2bit +chrUn_gl000237 45867 /gbdb/hg19/hg19.2bit +chrUn_gl000230 43691 /gbdb/hg19/hg19.2bit +chrUn_gl000242 43523 /gbdb/hg19/hg19.2bit +chrUn_gl000243 43341 /gbdb/hg19/hg19.2bit +chrUn_gl000241 42152 /gbdb/hg19/hg19.2bit +chrUn_gl000236 41934 /gbdb/hg19/hg19.2bit +chrUn_gl000240 41933 /gbdb/hg19/hg19.2bit +chr17_gl000206_random 41001 /gbdb/hg19/hg19.2bit +chrUn_gl000232 40652 /gbdb/hg19/hg19.2bit +chrUn_gl000234 40531 /gbdb/hg19/hg19.2bit +chr11_gl000202_random 40103 /gbdb/hg19/hg19.2bit +chrUn_gl000238 39939 /gbdb/hg19/hg19.2bit +chrUn_gl000244 39929 /gbdb/hg19/hg19.2bit +chrUn_gl000248 39786 /gbdb/hg19/hg19.2bit +chr8_gl000196_random 38914 /gbdb/hg19/hg19.2bit +chrUn_gl000249 38502 /gbdb/hg19/hg19.2bit +chrUn_gl000246 38154 /gbdb/hg19/hg19.2bit +chr17_gl000203_random 37498 /gbdb/hg19/hg19.2bit +chr8_gl000197_random 37175 /gbdb/hg19/hg19.2bit +chrUn_gl000245 36651 /gbdb/hg19/hg19.2bit +chrUn_gl000247 36422 /gbdb/hg19/hg19.2bit +chr9_gl000201_random 36148 /gbdb/hg19/hg19.2bit +chrUn_gl000235 34474 /gbdb/hg19/hg19.2bit +chrUn_gl000239 33824 /gbdb/hg19/hg19.2bit +chr21_gl000210_random 27682 /gbdb/hg19/hg19.2bit +chrUn_gl000231 27386 /gbdb/hg19/hg19.2bit +chrUn_gl000229 19913 /gbdb/hg19/hg19.2bit +chrM 16571 /gbdb/hg19/hg19.2bit +chrUn_gl000226 15008 /gbdb/hg19/hg19.2bit +chr18_gl000207_random 4262 /gbdb/hg19/hg19.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/mm8.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/mm8.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,34 @@ +chr1 197069962 /gbdb/mm8/mm8.2bit +chr2 181976762 /gbdb/mm8/mm8.2bit +chr3 159872112 /gbdb/mm8/mm8.2bit +chr4 155029701 /gbdb/mm8/mm8.2bit +chr5 152003063 /gbdb/mm8/mm8.2bit +chr6 149525685 /gbdb/mm8/mm8.2bit +chr7 145134094 /gbdb/mm8/mm8.2bit +chr8 132085098 /gbdb/mm8/mm8.2bit +chr9 124000669 /gbdb/mm8/mm8.2bit +chrM 16299 /gbdb/mm8/mm8.2bit +chrX 165556469 /gbdb/mm8/mm8.2bit +chrY 16029404 /gbdb/mm8/mm8.2bit +chr10 129959148 /gbdb/mm8/mm8.2bit +chr11 121798632 /gbdb/mm8/mm8.2bit +chr12 120463159 /gbdb/mm8/mm8.2bit +chr13 120614378 /gbdb/mm8/mm8.2bit +chr14 123978870 /gbdb/mm8/mm8.2bit +chr15 103492577 /gbdb/mm8/mm8.2bit +chr16 98252459 /gbdb/mm8/mm8.2bit +chr17 95177420 /gbdb/mm8/mm8.2bit +chr18 90736837 /gbdb/mm8/mm8.2bit +chr19 61321190 /gbdb/mm8/mm8.2bit +chr1_random 172274 /gbdb/mm8/mm8.2bit +chr5_random 2921247 /gbdb/mm8/mm8.2bit +chr7_random 243910 /gbdb/mm8/mm8.2bit +chr8_random 206961 /gbdb/mm8/mm8.2bit +chr9_random 17232 /gbdb/mm8/mm8.2bit +chrX_random 39696 /gbdb/mm8/mm8.2bit +chrY_random 14577732 /gbdb/mm8/mm8.2bit +chr10_random 10781 /gbdb/mm8/mm8.2bit +chr13_random 436191 /gbdb/mm8/mm8.2bit +chr15_random 105932 /gbdb/mm8/mm8.2bit +chr17_random 89091 /gbdb/mm8/mm8.2bit +chrUn_random 1540053 /gbdb/mm8/mm8.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/mm9.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/mm9.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,35 @@ +chr1 197195432 /gbdb/mm9/mm9.2bit +chr2 181748087 /gbdb/mm9/mm9.2bit +chr3 159599783 /gbdb/mm9/mm9.2bit +chr4 155630120 /gbdb/mm9/mm9.2bit +chr5 152537259 /gbdb/mm9/mm9.2bit +chr6 149517037 /gbdb/mm9/mm9.2bit +chr7 152524553 /gbdb/mm9/mm9.2bit +chr8 131738871 /gbdb/mm9/mm9.2bit +chr9 124076172 /gbdb/mm9/mm9.2bit +chr10 129993255 /gbdb/mm9/mm9.2bit +chr11 121843856 /gbdb/mm9/mm9.2bit +chr12 121257530 /gbdb/mm9/mm9.2bit +chr13 120284312 /gbdb/mm9/mm9.2bit +chr14 125194864 /gbdb/mm9/mm9.2bit +chr15 103494974 /gbdb/mm9/mm9.2bit +chr16 98319150 /gbdb/mm9/mm9.2bit +chr17 95272651 /gbdb/mm9/mm9.2bit +chr18 90772031 /gbdb/mm9/mm9.2bit +chr19 61342430 /gbdb/mm9/mm9.2bit +chrX 166650296 /gbdb/mm9/mm9.2bit +chrY 15902555 /gbdb/mm9/mm9.2bit +chrM 16299 /gbdb/mm9/mm9.2bit +chr13_random 400311 /gbdb/mm9/mm9.2bit +chr16_random 3994 /gbdb/mm9/mm9.2bit +chr17_random 628739 /gbdb/mm9/mm9.2bit +chr1_random 1231697 /gbdb/mm9/mm9.2bit +chr3_random 41899 /gbdb/mm9/mm9.2bit +chr4_random 160594 /gbdb/mm9/mm9.2bit +chr5_random 357350 /gbdb/mm9/mm9.2bit +chr7_random 362490 /gbdb/mm9/mm9.2bit +chr8_random 849593 /gbdb/mm9/mm9.2bit +chr9_random 449403 /gbdb/mm9/mm9.2bit +chrUn_random 5900358 /gbdb/mm9/mm9.2bit +chrX_random 1785075 /gbdb/mm9/mm9.2bit +chrY_random 58682461 /gbdb/mm9/mm9.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/panTro3.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/panTro3.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
b'@@ -0,0 +1,24132 @@\n+chr2B\t247518478\t/gbdb/panTro3/panTro3.2bit\n+chr1\t228333871\t/gbdb/panTro3/panTro3.2bit\n+chr3\t202329955\t/gbdb/panTro3/panTro3.2bit\n+chr4\t193495092\t/gbdb/panTro3/panTro3.2bit\n+chr5\t182651097\t/gbdb/panTro3/panTro3.2bit\n+chr6\t172623881\t/gbdb/panTro3/panTro3.2bit\n+chr7\t161824586\t/gbdb/panTro3/panTro3.2bit\n+chrX\t156848144\t/gbdb/panTro3/panTro3.2bit\n+chr8\t143986469\t/gbdb/panTro3/panTro3.2bit\n+chr9\t137840987\t/gbdb/panTro3/panTro3.2bit\n+chr12\t134246214\t/gbdb/panTro3/panTro3.2bit\n+chr10\t133524379\t/gbdb/panTro3/panTro3.2bit\n+chr11\t133121534\t/gbdb/panTro3/panTro3.2bit\n+chr13\t115123233\t/gbdb/panTro3/panTro3.2bit\n+chr2A\t113622374\t/gbdb/panTro3/panTro3.2bit\n+chr14\t106544938\t/gbdb/panTro3/panTro3.2bit\n+chr15\t99548318\t/gbdb/panTro3/panTro3.2bit\n+chr16\t89983829\t/gbdb/panTro3/panTro3.2bit\n+chr17\t82630442\t/gbdb/panTro3/panTro3.2bit\n+chr18\t76611499\t/gbdb/panTro3/panTro3.2bit\n+chr19\t63644993\t/gbdb/panTro3/panTro3.2bit\n+chr20\t61729293\t/gbdb/panTro3/panTro3.2bit\n+chr22\t49737984\t/gbdb/panTro3/panTro3.2bit\n+chr21\t32799110\t/gbdb/panTro3/panTro3.2bit\n+chrY\t23952694\t/gbdb/panTro3/panTro3.2bit\n+chr13_GL392075_random\t7510047\t/gbdb/panTro3/panTro3.2bit\n+chr11_GL391837_random\t5442033\t/gbdb/panTro3/panTro3.2bit\n+chr6_GL390389_random\t4046914\t/gbdb/panTro3/panTro3.2bit\n+chr8_GL390916_random\t3851136\t/gbdb/panTro3/panTro3.2bit\n+chr10_GL391668_random\t2614554\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393505\t1195001\t/gbdb/panTro3/panTro3.2bit\n+chr17_GL392652_random\t1012752\t/gbdb/panTro3/panTro3.2bit\n+chr19_GL392890_random\t922365\t/gbdb/panTro3/panTro3.2bit\n+chr4_GL389982_random\t806427\t/gbdb/panTro3/panTro3.2bit\n+chr9_GL391077_random\t720526\t/gbdb/panTro3/panTro3.2bit\n+chr15_GL392258_random\t711350\t/gbdb/panTro3/panTro3.2bit\n+chr17_GL392680_random\t691484\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393516\t597384\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393518\t573897\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393522\t458469\t/gbdb/panTro3/panTro3.2bit\n+chr20_GL393023_random\t436282\t/gbdb/panTro3/panTro3.2bit\n+chr2A_GL389368_random\t417915\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393519\t413329\t/gbdb/panTro3/panTro3.2bit\n+chr16_GL392457_random\t408961\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393523\t405060\t/gbdb/panTro3/panTro3.2bit\n+chr7_GL390650_random\t398731\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393524\t393793\t/gbdb/panTro3/panTro3.2bit\n+chr18_GL392798_random\t373489\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393525\t371432\t/gbdb/panTro3/panTro3.2bit\n+chr16_GL392524_random\t370847\t/gbdb/panTro3/panTro3.2bit\n+chrX_GL393313_random\t364597\t/gbdb/panTro3/panTro3.2bit\n+chr20_GL393019_random\t358895\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393530\t355541\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393527\t341619\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393542\t339612\t/gbdb/panTro3/panTro3.2bit\n+chrY_DP000056_random\t331329\t/gbdb/panTro3/panTro3.2bit\n+chr22_GL393078_random\t277661\t/gbdb/panTro3/panTro3.2bit\n+chrY_DP000055_random\t276070\t/gbdb/panTro3/panTro3.2bit\n+chr16_GL392506_random\t257012\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393533\t243864\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393535\t241809\t/gbdb/panTro3/panTro3.2bit\n+chr8_GL390880_random\t230064\t/gbdb/panTro3/panTro3.2bit\n+chr7_GL390654_random\t229574\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393532\t223908\t/gbdb/panTro3/panTro3.2bit\n+chr14_GL392151_random\t223111\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393534\t222311\t/gbdb/panTro3/panTro3.2bit\n+chr9_GL391203_random\t222250\t/gbdb/panTro3/panTro3.2bit\n+chr7_GL390752_random\t218097\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393539\t212451\t/gbdb/panTro3/panTro3.2bit\n+chr17_GL392651_random\t209936\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393541\t207381\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393537\t206612\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL396822\t202225\t/gbdb/panTro3/panTro3.2bit\n+chrX_GL393375_random\t197187\t/gbdb/panTro3/panTro3.2bit\n+chrUn_GL393540\t192064\t/gbdb/panTro3/panTro3.2bit\n+chr1_GL389174_random\t191010\t/gbdb/panTro3/panTro3.2bit\n+chr10_GL391667_random\t190155\t/gbdb/panTro3/panTro3.2bit\n+chr17_GL392675_random\t188176\t/gbdb/panTro3/panTro3.2bit\n+chr15_GL392289_random\t1'..b'it\n+chr6_AACZ03160190_random\t1178\t/gbdb/panTro3/panTro3.2bit\n+chr9_AACZ03165271_random\t1166\t/gbdb/panTro3/panTro3.2bit\n+chr18_AACZ03175668_random\t1158\t/gbdb/panTro3/panTro3.2bit\n+chr6_AACZ03160191_random\t1143\t/gbdb/panTro3/panTro3.2bit\n+chr19_AACZ03176425_random\t1126\t/gbdb/panTro3/panTro3.2bit\n+chr12_AACZ03170019_random\t1124\t/gbdb/panTro3/panTro3.2bit\n+chr11_AACZ03169134_random\t1121\t/gbdb/panTro3/panTro3.2bit\n+chrX_AACZ03178602_random\t1120\t/gbdb/panTro3/panTro3.2bit\n+chr20_AACZ03176904_random\t1117\t/gbdb/panTro3/panTro3.2bit\n+chr6_AACZ03159656_random\t1114\t/gbdb/panTro3/panTro3.2bit\n+chr2B_AACZ03153615_random\t1113\t/gbdb/panTro3/panTro3.2bit\n+chr19_AACZ03176437_random\t1104\t/gbdb/panTro3/panTro3.2bit\n+chr3_AACZ03155018_random\t1100\t/gbdb/panTro3/panTro3.2bit\n+chr9_AACZ03165347_random\t1090\t/gbdb/panTro3/panTro3.2bit\n+chr15_AACZ03172446_random\t1079\t/gbdb/panTro3/panTro3.2bit\n+chr1_AACZ03151783_random\t1075\t/gbdb/panTro3/panTro3.2bit\n+chr1_AACZ03151688_random\t1073\t/gbdb/panTro3/panTro3.2bit\n+chr8_AACZ03163611_random\t1073\t/gbdb/panTro3/panTro3.2bit\n+chr15_AACZ03172500_random\t1070\t/gbdb/panTro3/panTro3.2bit\n+chr11_AACZ03169120_random\t1065\t/gbdb/panTro3/panTro3.2bit\n+chr1_AACZ03151643_random\t1057\t/gbdb/panTro3/panTro3.2bit\n+chr12_AACZ03169983_random\t1038\t/gbdb/panTro3/panTro3.2bit\n+chr5_AACZ03158305_random\t1036\t/gbdb/panTro3/panTro3.2bit\n+chr5_AACZ03158221_random\t1035\t/gbdb/panTro3/panTro3.2bit\n+chr12_AACZ03170032_random\t1032\t/gbdb/panTro3/panTro3.2bit\n+chr18_AACZ03175672_random\t1016\t/gbdb/panTro3/panTro3.2bit\n+chr2B_AACZ03153607_random\t1015\t/gbdb/panTro3/panTro3.2bit\n+chr14_AACZ03171691_random\t1008\t/gbdb/panTro3/panTro3.2bit\n+chr8_AACZ03163602_random\t995\t/gbdb/panTro3/panTro3.2bit\n+chr7_AACZ03162167_random\t992\t/gbdb/panTro3/panTro3.2bit\n+chr11_AACZ03169132_random\t981\t/gbdb/panTro3/panTro3.2bit\n+chr14_AACZ03171726_random\t977\t/gbdb/panTro3/panTro3.2bit\n+chr1_AACZ03151510_random\t967\t/gbdb/panTro3/panTro3.2bit\n+chr16_AACZ03174069_random\t965\t/gbdb/panTro3/panTro3.2bit\n+chr18_AACZ03175682_random\t960\t/gbdb/panTro3/panTro3.2bit\n+chr14_AACZ03171712_random\t959\t/gbdb/panTro3/panTro3.2bit\n+chrX_AACZ03178598_random\t958\t/gbdb/panTro3/panTro3.2bit\n+chr8_AACZ03163637_random\t957\t/gbdb/panTro3/panTro3.2bit\n+chr9_AACZ03165403_random\t946\t/gbdb/panTro3/panTro3.2bit\n+chr11_AACZ03169131_random\t930\t/gbdb/panTro3/panTro3.2bit\n+chr14_AACZ03171718_random\t925\t/gbdb/panTro3/panTro3.2bit\n+chrX_AACZ03178599_random\t901\t/gbdb/panTro3/panTro3.2bit\n+chr3_AACZ03155017_random\t900\t/gbdb/panTro3/panTro3.2bit\n+chr3_AACZ03155010_random\t899\t/gbdb/panTro3/panTro3.2bit\n+chr8_AACZ03163641_random\t897\t/gbdb/panTro3/panTro3.2bit\n+chr8_AACZ03163613_random\t896\t/gbdb/panTro3/panTro3.2bit\n+chr2B_AACZ03153521_random\t885\t/gbdb/panTro3/panTro3.2bit\n+chr3_AACZ03155053_random\t882\t/gbdb/panTro3/panTro3.2bit\n+chr1_AACZ03151847_random\t873\t/gbdb/panTro3/panTro3.2bit\n+chr2A_AACZ03152669_random\t873\t/gbdb/panTro3/panTro3.2bit\n+chr1_AACZ03151840_random\t870\t/gbdb/panTro3/panTro3.2bit\n+chr2A_AACZ03152778_random\t851\t/gbdb/panTro3/panTro3.2bit\n+chr4_AACZ03156965_random\t850\t/gbdb/panTro3/panTro3.2bit\n+chr8_AACZ03163636_random\t829\t/gbdb/panTro3/panTro3.2bit\n+chr16_AACZ03174058_random\t822\t/gbdb/panTro3/panTro3.2bit\n+chr12_AACZ03170074_random\t821\t/gbdb/panTro3/panTro3.2bit\n+chr13_AACZ03171025_random\t814\t/gbdb/panTro3/panTro3.2bit\n+chr17_AACZ03175059_random\t801\t/gbdb/panTro3/panTro3.2bit\n+chr2A_AACZ03152776_random\t801\t/gbdb/panTro3/panTro3.2bit\n+chr4_AACZ03157024_random\t796\t/gbdb/panTro3/panTro3.2bit\n+chr11_AACZ03169133_random\t778\t/gbdb/panTro3/panTro3.2bit\n+chr4_AACZ03157023_random\t773\t/gbdb/panTro3/panTro3.2bit\n+chr7_AACZ03162166_random\t764\t/gbdb/panTro3/panTro3.2bit\n+chr11_AACZ03169135_random\t762\t/gbdb/panTro3/panTro3.2bit\n+chr18_AACZ03175702_random\t741\t/gbdb/panTro3/panTro3.2bit\n+chr6_AACZ03158310_random\t740\t/gbdb/panTro3/panTro3.2bit\n+chr2B_AACZ03153257_random\t661\t/gbdb/panTro3/panTro3.2bit\n+chr16_AACZ03174065_random\t659\t/gbdb/panTro3/panTro3.2bit\n+chr1_AACZ03151841_random\t373\t/gbdb/panTro3/panTro3.2bit\n' |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/rn3.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/rn3.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,44 @@ +chr1 268121971 /gbdb/rn3/nib/chr1.nib +chr2 258222147 /gbdb/rn3/nib/chr2.nib +chr3 170969371 /gbdb/rn3/nib/chr3.nib +chr4 187371129 /gbdb/rn3/nib/chr4.nib +chr5 173106704 /gbdb/rn3/nib/chr5.nib +chr6 147642806 /gbdb/rn3/nib/chr6.nib +chr7 143082968 /gbdb/rn3/nib/chr7.nib +chr8 129061546 /gbdb/rn3/nib/chr8.nib +chr9 113649943 /gbdb/rn3/nib/chr9.nib +chrX 160775580 /gbdb/rn3/nib/chrX.nib +chr1_random 3887217 /gbdb/rn3/nib/chr1_random.nib +chr2_random 4341851 /gbdb/rn3/nib/chr2_random.nib +chr3_random 1724363 /gbdb/rn3/nib/chr3_random.nib +chr4_random 2124656 /gbdb/rn3/nib/chr4_random.nib +chr5_random 2145107 /gbdb/rn3/nib/chr5_random.nib +chr6_random 1770534 /gbdb/rn3/nib/chr6_random.nib +chr7_random 1175105 /gbdb/rn3/nib/chr7_random.nib +chr8_random 887087 /gbdb/rn3/nib/chr8_random.nib +chr9_random 1166303 /gbdb/rn3/nib/chr9_random.nib +chrX_random 1977738 /gbdb/rn3/nib/chrX_random.nib +chr10 110733352 /gbdb/rn3/nib/chr10.nib +chr11 87800381 /gbdb/rn3/nib/chr11.nib +chr12 46649226 /gbdb/rn3/nib/chr12.nib +chr13 111348958 /gbdb/rn3/nib/chr13.nib +chr14 112220682 /gbdb/rn3/nib/chr14.nib +chr15 109774626 /gbdb/rn3/nib/chr15.nib +chr16 90224819 /gbdb/rn3/nib/chr16.nib +chr17 97307196 /gbdb/rn3/nib/chr17.nib +chr18 87338544 /gbdb/rn3/nib/chr18.nib +chr19 59223525 /gbdb/rn3/nib/chr19.nib +chr20 55296979 /gbdb/rn3/nib/chr20.nib +chrUn 75822765 /gbdb/rn3/nib/chrUn.nib +chr10_random 870782 /gbdb/rn3/nib/chr10_random.nib +chr11_random 1278614 /gbdb/rn3/nib/chr11_random.nib +chr12_random 953141 /gbdb/rn3/nib/chr12_random.nib +chr13_random 608348 /gbdb/rn3/nib/chr13_random.nib +chr14_random 1825095 /gbdb/rn3/nib/chr14_random.nib +chr15_random 1609635 /gbdb/rn3/nib/chr15_random.nib +chr16_random 1400107 /gbdb/rn3/nib/chr16_random.nib +chr17_random 615889 /gbdb/rn3/nib/chr17_random.nib +chr18_random 594525 /gbdb/rn3/nib/chr18_random.nib +chr19_random 984116 /gbdb/rn3/nib/chr19_random.nib +chr20_random 604928 /gbdb/rn3/nib/chr20_random.nib +chrUn_random 6862066 /gbdb/rn3/nib/chrUn_random.nib |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/rn4.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/rn4.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,45 @@ +chr1 267910886 /gbdb/rn4/rn4.2bit +chr1_random 3887217 /gbdb/rn4/rn4.2bit +chr10 110718848 /gbdb/rn4/rn4.2bit +chr10_random 870782 /gbdb/rn4/rn4.2bit +chr11 87759784 /gbdb/rn4/rn4.2bit +chr11_random 1278614 /gbdb/rn4/rn4.2bit +chr12 46782294 /gbdb/rn4/rn4.2bit +chr12_random 953141 /gbdb/rn4/rn4.2bit +chr13 111154910 /gbdb/rn4/rn4.2bit +chr13_random 608348 /gbdb/rn4/rn4.2bit +chr14 112194335 /gbdb/rn4/rn4.2bit +chr14_random 1825095 /gbdb/rn4/rn4.2bit +chr15 109758846 /gbdb/rn4/rn4.2bit +chr15_random 1609635 /gbdb/rn4/rn4.2bit +chr16 90238779 /gbdb/rn4/rn4.2bit +chr16_random 1400107 /gbdb/rn4/rn4.2bit +chr17 97296363 /gbdb/rn4/rn4.2bit +chr17_random 615889 /gbdb/rn4/rn4.2bit +chr18 87265094 /gbdb/rn4/rn4.2bit +chr18_random 594525 /gbdb/rn4/rn4.2bit +chr19 59218465 /gbdb/rn4/rn4.2bit +chr19_random 984116 /gbdb/rn4/rn4.2bit +chr2 258207540 /gbdb/rn4/rn4.2bit +chr2_random 4341851 /gbdb/rn4/rn4.2bit +chr20 55268282 /gbdb/rn4/rn4.2bit +chr20_random 604928 /gbdb/rn4/rn4.2bit +chr3 171063335 /gbdb/rn4/rn4.2bit +chr3_random 1724363 /gbdb/rn4/rn4.2bit +chr4 187126005 /gbdb/rn4/rn4.2bit +chr4_random 2124656 /gbdb/rn4/rn4.2bit +chr5 173096209 /gbdb/rn4/rn4.2bit +chr5_random 2145107 /gbdb/rn4/rn4.2bit +chr6 147636619 /gbdb/rn4/rn4.2bit +chr6_random 1770534 /gbdb/rn4/rn4.2bit +chr7 143002779 /gbdb/rn4/rn4.2bit +chr7_random 1175105 /gbdb/rn4/rn4.2bit +chr8 129041809 /gbdb/rn4/rn4.2bit +chr8_random 887087 /gbdb/rn4/rn4.2bit +chr9 113440463 /gbdb/rn4/rn4.2bit +chr9_random 1166303 /gbdb/rn4/rn4.2bit +chrM 16300 /gbdb/rn4/rn4.2bit +chrUn 75822765 /gbdb/rn4/rn4.2bit +chrUn_random 6862066 /gbdb/rn4/rn4.2bit +chrX 160699376 /gbdb/rn4/rn4.2bit +chrX_random 1977738 /gbdb/rn4/rn4.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/chromInfo/susScr2.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/chromInfo/susScr2.txt Mon Nov 21 08:12:19 2011 -0500 |
b |
@@ -0,0 +1,20 @@ +chr1 295529705 /gbdb/susScr2/susScr2.2bit +chr14 148510138 /gbdb/susScr2/susScr2.2bit +chr13 145235301 /gbdb/susScr2/susScr2.2bit +chr2 140133492 /gbdb/susScr2/susScr2.2bit +chr7 136409062 /gbdb/susScr2/susScr2.2bit +chr4 136254946 /gbdb/susScr2/susScr2.2bit +chr15 134541103 /gbdb/susScr2/susScr2.2bit +chr9 132468591 /gbdb/susScr2/susScr2.2bit +chrX 125871292 /gbdb/susScr2/susScr2.2bit +chr3 123599780 /gbdb/susScr2/susScr2.2bit +chr6 123305171 /gbdb/susScr2/susScr2.2bit +chr8 119985671 /gbdb/susScr2/susScr2.2bit +chr5 100516970 /gbdb/susScr2/susScr2.2bit +chr11 79814395 /gbdb/susScr2/susScr2.2bit +chr16 77435658 /gbdb/susScr2/susScr2.2bit +chr10 66736929 /gbdb/susScr2/susScr2.2bit +chr17 64395339 /gbdb/susScr2/susScr2.2bit +chr12 57431344 /gbdb/susScr2/susScr2.2bit +chr18 54309914 /gbdb/susScr2/susScr2.2bit +chrM 16770 /gbdb/susScr2/susScr2.2bit |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/fetchChromSizes --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NGSrich_0.5.5/thirdparty/fetchChromSizes Mon Nov 21 08:12:19 2011 -0500 |
[ |
@@ -0,0 +1,94 @@ +#!/bin/sh + +# fetchChromSizes - script to grab chrom.sizes from UCSC via either of: +# mysql, wget or ftp + +# "$Id: fetchChromSizes,v 1.2 2009/03/26 18:40:09 hiram Exp $" + +usage() { + echo "usage: fetchChromSizes <db> > <db>.chrom.sizes" + echo " used to fetch chrom.sizes information from UCSC for the given <db>" + echo "<db> - name of UCSC database, e.g.: hg18, mm9, etc ..." + echo "" + echo "This script expects to find one of the following commands:" + echo " wget, mysql, or ftp in order to fetch information from UCSC." + echo "Route the output to the file <db>.chrom.sizes as indicated above." + echo "" + echo "Example: fetchChromSizes hg18 > hg18.chrom.sizes" + exit 255 +} + +DB=$1 +export DB +if [ -z "${DB}" ]; then + usage +fi + +WGET=`type wget 2> /dev/null | sed -e "s/.* is //"` +MYSQL=`type mysql 2> /dev/null | sed -e "s/.* is //"` +FTP=`type ftp 2> /dev/null | sed -e "s/.* is //"` + +if [ -z "${WGET}" -a -z "${MYSQL}" -a -z "${FTP}" ]; then + echo "ERROR: can not find any of the commands: wget mysql or ftp" + usage +fi + +DONE=0 +export DONE +if [ -n "${MYSQL}" ]; then + echo "INFO: trying MySQL ${MYSQL} for database ${DB}" 1>&2 + ${MYSQL} -N --user=genome --host=genome-mysql.cse.ucsc.edu -A -e \ + "SELECT chrom,size FROM chromInfo ORDER BY size DESC;" ${DB} + if [ $? -ne 0 ]; then + echo "WARNING: mysql command failed" 1>&2 + else + DONE=1 + fi +fi + +if [ "${DONE}" -eq 1 ]; then + exit 0 +fi + +if [ -n "${WGET}" ]; then + echo "INFO: trying WGET ${WGET} for database ${DB}" 1>&2 + tmpResult=chromInfoTemp.$$.gz + ${WGET} \ +"ftp://hgdownload.cse.ucsc.edu/goldenPath/${DB}/database/chromInfo.txt.gz" \ + -O ${tmpResult} 2> /dev/null + if [ $? -ne 0 -o ! -s "${tmpResult}" ]; then + echo "WARNING: wget command failed" 1>&2 + rm -f "${tmpResult}" + else + zcat ${tmpResult} 2> /dev/null | cut -f1,2 | sort -k2nr + rm -f "${tmpResult}" + DONE=1 + fi +fi + +if [ "${DONE}" -eq 1 ]; then + exit 0 +fi + +if [ -n "${FTP}" ]; then + echo "INFO: trying FTP ${FTP} for database ${DB}" 1>&2 + tmpFtpRsp=fetchTemp.$$ + echo "user anonymous fetchChromSizes@" > ${tmpFtpRsp} + echo "cd goldenPath/${DB}/database" >> ${tmpFtpRsp} + echo "get chromInfo.txt.gz ${tmpResult}" >> ${tmpFtpRsp} + echo "bye" >> ${tmpFtpRsp} + ${FTP} -u -n -i hgdownload.cse.ucsc.edu < ${tmpFtpRsp} > /dev/null 2>&1 + if [ $? -ne 0 -o ! -s "${tmpResult}" ]; then + echo "ERROR: ftp command failed" 1>&2 + rm -f "${tmpFtpRsp}" "${tmpResult}" + else + zcat ${tmpResult} | cut -f1,2 | sort -k2nr + rm -f "${tmpFtpRsp}" "${tmpResult}" + DONE=1 + fi +fi + +if [ "${DONE}" -eq 0 ]; then + echo "ERROR: sorry, attempt to fetch chrom.sizes has failed ?" 1>&2 + exit 255 +fi |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/samtools/0.1.16/samtools |
b |
Binary file NGSrich_0.5.5/thirdparty/samtools/0.1.16/samtools has changed |
b |
diff -r 000000000000 -r 89ad0a9cca52 NGSrich_0.5.5/thirdparty/wigToBigWig |
b |
Binary file NGSrich_0.5.5/thirdparty/wigToBigWig has changed |