From 5f38ef0b2ae1355b51fd79cfac56f261f4bd78a7 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 7 May 2018 14:51:53 +0100 Subject: [PATCH] JAL-1767 scheme DoubleMatrix type includes D and E vectors (optional) --- schemas/jalview.xsd | 7 +- src/jalview/gui/Jalview2XML.java | 62 ++++---- src/jalview/schemabinding/version2/.castor.cdr | 120 ++++++++-------- .../version2/{EigenMatrixD.java => D.java} | 10 +- .../schemabinding/version2/DoubleMatrix.java | 52 +++++++ .../schemabinding/version2/DoubleVector.java | 90 ++++++------ .../version2/{TridiagonalD.java => E.java} | 10 +- .../schemabinding/version2/PcaDataType.java | 81 ----------- .../schemabinding/version2/TridiagonalE.java | 126 ----------------- ...ridiagonalDDescriptor.java => DDescriptor.java} | 12 +- .../descriptors/DoubleMatrixDescriptor.java | 82 +++++++++++ .../descriptors/DoubleVectorDescriptor.java | 12 +- ...ridiagonalEDescriptor.java => EDescriptor.java} | 12 +- .../descriptors/EigenMatrixDDescriptor.java | 149 -------------------- .../descriptors/PcaDataTypeDescriptor.java | 135 ------------------ 15 files changed, 304 insertions(+), 656 deletions(-) rename src/jalview/schemabinding/version2/{EigenMatrixD.java => D.java} (92%) rename src/jalview/schemabinding/version2/{TridiagonalD.java => E.java} (93%) delete mode 100644 src/jalview/schemabinding/version2/TridiagonalE.java rename src/jalview/schemabinding/version2/descriptors/{TridiagonalDDescriptor.java => DDescriptor.java} (91%) rename src/jalview/schemabinding/version2/descriptors/{TridiagonalEDescriptor.java => EDescriptor.java} (91%) delete mode 100644 src/jalview/schemabinding/version2/descriptors/EigenMatrixDDescriptor.java diff --git a/schemas/jalview.xsd b/schemas/jalview.xsd index acf842b..c528539 100755 --- a/schemas/jalview.xsd +++ b/schemas/jalview.xsd @@ -701,20 +701,19 @@ - - - - + + + diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index e4a53ef..689261c 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -66,10 +66,11 @@ import jalview.schemabinding.version2.AnnotationElement; import jalview.schemabinding.version2.Axis; import jalview.schemabinding.version2.CalcIdParam; import jalview.schemabinding.version2.CompoundMatcher; +import jalview.schemabinding.version2.D; import jalview.schemabinding.version2.DBRef; import jalview.schemabinding.version2.DoubleMatrix; +import jalview.schemabinding.version2.E; import jalview.schemabinding.version2.EigenMatrix; -import jalview.schemabinding.version2.EigenMatrixD; import jalview.schemabinding.version2.Features; import jalview.schemabinding.version2.Group; import jalview.schemabinding.version2.HiddenColumns; @@ -103,8 +104,6 @@ import jalview.schemabinding.version2.Setting; import jalview.schemabinding.version2.StructureState; import jalview.schemabinding.version2.ThresholdLine; import jalview.schemabinding.version2.Tree; -import jalview.schemabinding.version2.TridiagonalD; -import jalview.schemabinding.version2.TridiagonalE; import jalview.schemabinding.version2.TridiagonalMatrix; import jalview.schemabinding.version2.UserColours; import jalview.schemabinding.version2.Viewport; @@ -1619,35 +1618,24 @@ public class Jalview2XML } /* - * raw PCA data + * raw PCA data (note we are not restoring PCA inputs here - + * alignment view, score model, similarity parameters) */ PcaData data = new PcaData(); viewer.setPcaData(data); PCA pca = pcaModel.getPcaData(); PairwiseMatrix pm = new PairwiseMatrix(); - MatrixI m = pca.getPairwiseScores(); - saveDoubleMatrix(m, pm); + saveDoubleMatrix(pca.getPairwiseScores(), pm); data.setPairwiseMatrix(pm); TridiagonalMatrix tm = new TridiagonalMatrix(); - m = pca.getTridiagonal(); - saveDoubleMatrix(m, tm); + saveDoubleMatrix(pca.getTridiagonal(), tm); data.setTridiagonalMatrix(tm); - TridiagonalD tridiagonalD = new TridiagonalD(); - tridiagonalD.setD(m.getD()); - data.setTridiagonalD(tridiagonalD); - TridiagonalE tridiagonalE = new TridiagonalE(); - tridiagonalE.setD(m.getE()); - data.setTridiagonalE(tridiagonalE); - - m = pca.getEigenmatrix(); + EigenMatrix eigenMatrix = new EigenMatrix(); data.setEigenMatrix(eigenMatrix); - saveDoubleMatrix(m, eigenMatrix); - EigenMatrixD eigenmatrixD = new EigenMatrixD(); - eigenmatrixD.setD(m.getD()); - data.setEigenMatrixD(eigenmatrixD); + saveDoubleMatrix(pca.getEigenmatrix(), eigenMatrix); jms.addPcaViewer(viewer); } catch (Throwable t) @@ -1657,7 +1645,8 @@ public class Jalview2XML } /** - * Stores values from a matrix into an XML element + * Stores values from a matrix into an XML element, including (if present) the + * D or E vectors * * @param m * @param xmlMatrix @@ -1672,14 +1661,27 @@ public class Jalview2XML Row row = new Row(); for (int j = 0; j < m.width(); j++) { - row.addD(m.getValue(i, j)); + row.addV(m.getValue(i, j)); } xmlMatrix.addRow(row); } + if (m.getD() != null) + { + D dVector = new D(); + dVector.setV(m.getD()); + xmlMatrix.setD(dVector); + } + if (m.getE() != null) + { + E eVector = new E(); + eVector.setV(m.getE()); + xmlMatrix.setE(eVector); + } } /** - * Loads XML matrix data into a new Matrix object + * Loads XML matrix data into a new Matrix object, including the D and/or E + * vectors (if present) * * @param mData * @return @@ -1692,10 +1694,19 @@ public class Jalview2XML for (int i = 0; i < rows; i++) { - vals[i] = mData.getRow(i).getD(); + vals[i] = mData.getRow(i).getV(); } MatrixI m = new Matrix(vals); + + if (mData.getD() != null) { + m.setD(mData.getD().getV()); + } + if (mData.getE() != null) + { + m.setE(mData.getE().getV()); + } + return m; } @@ -5950,12 +5961,9 @@ public class Jalview2XML pca.setPairwiseScores(pairwise); MatrixI triDiag = loadDoubleMatrix(pcaData.getTridiagonalMatrix()); - triDiag.setD(pcaData.getTridiagonalD().getD()); - triDiag.setE(pcaData.getTridiagonalE().getD()); pca.setTridiagonal(triDiag); MatrixI result = loadDoubleMatrix(pcaData.getEigenMatrix()); - result.setD(pcaData.getEigenMatrixD().getD()); pca.setEigenmatrix(result); panel.pcaModel.setPCA(pca); diff --git a/src/jalview/schemabinding/version2/.castor.cdr b/src/jalview/schemabinding/version2/.castor.cdr index 0141c27..34aaf3e 100644 --- a/src/jalview/schemabinding/version2/.castor.cdr +++ b/src/jalview/schemabinding/version2/.castor.cdr @@ -1,71 +1,73 @@ -#Mon May 07 09:17:08 BST 2018 -jalview.schemabinding.version2.SeqPointMax=jalview.schemabinding.version2.descriptors.SeqPointMaxDescriptor -jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor -jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor -jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor +#Mon May 07 14:44:01 BST 2018 +jalview.schemabinding.version2.SecondaryStructure=jalview.schemabinding.version2.descriptors.SecondaryStructureDescriptor +jalview.schemabinding.version2.MapListFrom=jalview.schemabinding.version2.descriptors.MapListFromDescriptor +jalview.schemabinding.version2.DoubleVector=jalview.schemabinding.version2.descriptors.DoubleVectorDescriptor +jalview.schemabinding.version2.Features=jalview.schemabinding.version2.descriptors.FeaturesDescriptor +jalview.schemabinding.version2.MapListType=jalview.schemabinding.version2.descriptors.MapListTypeDescriptor +jalview.schemabinding.version2.CompoundMatcher=jalview.schemabinding.version2.descriptors.CompoundMatcherDescriptor jalview.schemabinding.version2.CalcIdParam=jalview.schemabinding.version2.descriptors.CalcIdParamDescriptor -jalview.schemabinding.version2.Tree=jalview.schemabinding.version2.descriptors.TreeDescriptor -jalview.schemabinding.version2.JalviewModel=jalview.schemabinding.version2.descriptors.JalviewModelDescriptor -jalview.schemabinding.version2.SequenceType=jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor -jalview.schemabinding.version2.TridiagonalE=jalview.schemabinding.version2.descriptors.TridiagonalEDescriptor -jalview.schemabinding.version2.SequencePoint=jalview.schemabinding.version2.descriptors.SequencePointDescriptor -jalview.schemabinding.version2.OtherData=jalview.schemabinding.version2.descriptors.OtherDataDescriptor -jalview.schemabinding.version2.Setting=jalview.schemabinding.version2.descriptors.SettingDescriptor -jalview.schemabinding.version2.TridiagonalD=jalview.schemabinding.version2.descriptors.TridiagonalDDescriptor jalview.schemabinding.version2.Axis=jalview.schemabinding.version2.descriptors.AxisDescriptor +jalview.schemabinding.version2.E=jalview.schemabinding.version2.descriptors.EDescriptor +jalview.schemabinding.version2.D=jalview.schemabinding.version2.descriptors.DDescriptor jalview.schemabinding.version2.AlcodonFrame=jalview.schemabinding.version2.descriptors.AlcodonFrameDescriptor -jalview.schemabinding.version2.AnnotationElement=jalview.schemabinding.version2.descriptors.AnnotationElementDescriptor +jalview.schemabinding.version2.DBRef=jalview.schemabinding.version2.descriptors.DBRefDescriptor +jalview.schemabinding.version2.JSeq=jalview.schemabinding.version2.descriptors.JSeqDescriptor +jalview.schemabinding.version2.VAMSAS=jalview.schemabinding.version2.descriptors.VAMSASDescriptor +jalview.schemabinding.version2.SequencePoint=jalview.schemabinding.version2.descriptors.SequencePointDescriptor +jalview.schemabinding.version2.AlcodMap=jalview.schemabinding.version2.descriptors.AlcodMapDescriptor +jalview.schemabinding.version2.TridiagonalMatrix=jalview.schemabinding.version2.descriptors.TridiagonalMatrixDescriptor jalview.schemabinding.version2.Row=jalview.schemabinding.version2.descriptors.RowDescriptor +jalview.schemabinding.version2.PairwiseMatrix=jalview.schemabinding.version2.descriptors.PairwiseMatrixDescriptor +jalview.schemabinding.version2.RnaViewer=jalview.schemabinding.version2.descriptors.RnaViewerDescriptor +jalview.schemabinding.version2.Group=jalview.schemabinding.version2.descriptors.GroupDescriptor +jalview.schemabinding.version2.PcaViewer=jalview.schemabinding.version2.descriptors.PcaViewerDescriptor +jalview.schemabinding.version2.JalviewModel=jalview.schemabinding.version2.descriptors.JalviewModelDescriptor +jalview.schemabinding.version2.JalviewModelSequence=jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor +jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor +jalview.schemabinding.version2.TridiagonalE=jalview.schemabinding.version2.descriptors.TridiagonalEDescriptor +jalview.schemabinding.version2.TridiagonalD=jalview.schemabinding.version2.descriptors.TridiagonalDDescriptor jalview.schemabinding.version2.FeatureMatcherSet=jalview.schemabinding.version2.descriptors.FeatureMatcherSetDescriptor +jalview.schemabinding.version2.VamsasModel=jalview.schemabinding.version2.descriptors.VamsasModelDescriptor +jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor +jalview.schemabinding.version2.MatcherSet=jalview.schemabinding.version2.descriptors.MatcherSetDescriptor +jalview.schemabinding.version2.JalviewUserColours=jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor +jalview.schemabinding.version2.FeatureSettings=jalview.schemabinding.version2.descriptors.FeatureSettingsDescriptor +jalview.schemabinding.version2.AnnotationColours=jalview.schemabinding.version2.descriptors.AnnotationColoursDescriptor +jalview.schemabinding.version2.UserColours=jalview.schemabinding.version2.descriptors.UserColoursDescriptor +jalview.schemabinding.version2.PcaData=jalview.schemabinding.version2.descriptors.PcaDataDescriptor +jalview.schemabinding.version2.Feature=jalview.schemabinding.version2.descriptors.FeatureDescriptor +jalview.schemabinding.version2.FeatureMatcher=jalview.schemabinding.version2.descriptors.FeatureMatcherDescriptor +jalview.schemabinding.version2.EigenMatrixE=jalview.schemabinding.version2.descriptors.EigenMatrixEDescriptor +jalview.schemabinding.version2.EigenMatrixD=jalview.schemabinding.version2.descriptors.EigenMatrixDDescriptor +jalview.schemabinding.version2.Annotation=jalview.schemabinding.version2.descriptors.AnnotationDescriptor jalview.schemabinding.version2.EigenMatrix=jalview.schemabinding.version2.descriptors.EigenMatrixDescriptor -jalview.schemabinding.version2.SecondaryStructure=jalview.schemabinding.version2.descriptors.SecondaryStructureDescriptor -jalview.schemabinding.version2.MatchCondition=jalview.schemabinding.version2.descriptors.MatchConditionDescriptor -jalview.schemabinding.version2.SequenceSet=jalview.schemabinding.version2.descriptors.SequenceSetDescriptor -jalview.schemabinding.version2.Viewport=jalview.schemabinding.version2.descriptors.ViewportDescriptor -jalview.schemabinding.version2.RnaViewer=jalview.schemabinding.version2.descriptors.RnaViewerDescriptor -jalview.schemabinding.version2.MapListType=jalview.schemabinding.version2.descriptors.MapListTypeDescriptor +jalview.schemabinding.version2.HiddenColumns=jalview.schemabinding.version2.descriptors.HiddenColumnsDescriptor jalview.schemabinding.version2.Property=jalview.schemabinding.version2.descriptors.PropertyDescriptor -jalview.schemabinding.version2.UserColourScheme=jalview.schemabinding.version2.descriptors.UserColourSchemeDescriptor -jalview.schemabinding.version2.DoubleMatrix=jalview.schemabinding.version2.descriptors.DoubleMatrixDescriptor -jalview.schemabinding.version2.DBRef=jalview.schemabinding.version2.descriptors.DBRefDescriptor -jalview.schemabinding.version2.AlcodMap=jalview.schemabinding.version2.descriptors.AlcodMapDescriptor -jalview.schemabinding.version2.SymmMatrix=jalview.schemabinding.version2.descriptors.SymmMatrixDescriptor -jalview.schemabinding.version2.Annotation=jalview.schemabinding.version2.descriptors.AnnotationDescriptor -jalview.schemabinding.version2.SeqPointMin=jalview.schemabinding.version2.descriptors.SeqPointMinDescriptor -jalview.schemabinding.version2.JSeq=jalview.schemabinding.version2.descriptors.JSeqDescriptor -jalview.schemabinding.version2.MatcherSet=jalview.schemabinding.version2.descriptors.MatcherSetDescriptor +jalview.schemabinding.version2.Tree=jalview.schemabinding.version2.descriptors.TreeDescriptor +jalview.schemabinding.version2.Pdbentry=jalview.schemabinding.version2.descriptors.PdbentryDescriptor +jalview.schemabinding.version2.OtherData=jalview.schemabinding.version2.descriptors.OtherDataDescriptor jalview.schemabinding.version2.Sequence=jalview.schemabinding.version2.descriptors.SequenceDescriptor -jalview.schemabinding.version2.Filter=jalview.schemabinding.version2.descriptors.FilterDescriptor -jalview.schemabinding.version2.WebServiceParameterSet=jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor -jalview.schemabinding.version2.Alcodon=jalview.schemabinding.version2.descriptors.AlcodonDescriptor -jalview.schemabinding.version2.AnnotationColours=jalview.schemabinding.version2.descriptors.AnnotationColoursDescriptor -jalview.schemabinding.version2.TridiagonalMatrix=jalview.schemabinding.version2.descriptors.TridiagonalMatrixDescriptor -jalview.schemabinding.version2.Pdbids=jalview.schemabinding.version2.descriptors.PdbidsDescriptor jalview.schemabinding.version2.AnnotationColourScheme=jalview.schemabinding.version2.descriptors.AnnotationColourSchemeDescriptor +jalview.schemabinding.version2.Setting=jalview.schemabinding.version2.descriptors.SettingDescriptor +jalview.schemabinding.version2.Pdbids=jalview.schemabinding.version2.descriptors.PdbidsDescriptor +jalview.schemabinding.version2.JGroup=jalview.schemabinding.version2.descriptors.JGroupDescriptor jalview.schemabinding.version2.Mapping=jalview.schemabinding.version2.descriptors.MappingDescriptor -jalview.schemabinding.version2.PcaData=jalview.schemabinding.version2.descriptors.PcaDataDescriptor -jalview.schemabinding.version2.PcaViewer=jalview.schemabinding.version2.descriptors.PcaViewerDescriptor -jalview.schemabinding.version2.CompoundMatcher=jalview.schemabinding.version2.descriptors.CompoundMatcherDescriptor -jalview.schemabinding.version2.JalviewModelSequence=jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor -jalview.schemabinding.version2.Group=jalview.schemabinding.version2.descriptors.GroupDescriptor -jalview.schemabinding.version2.MappingChoice=jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor -jalview.schemabinding.version2.Feature=jalview.schemabinding.version2.descriptors.FeatureDescriptor -jalview.schemabinding.version2.UserColours=jalview.schemabinding.version2.descriptors.UserColoursDescriptor -jalview.schemabinding.version2.Colour=jalview.schemabinding.version2.descriptors.ColourDescriptor +jalview.schemabinding.version2.SequenceSet=jalview.schemabinding.version2.descriptors.SequenceSetDescriptor +jalview.schemabinding.version2.PcaDataType=jalview.schemabinding.version2.descriptors.PcaDataTypeDescriptor +jalview.schemabinding.version2.SeqPointMin=jalview.schemabinding.version2.descriptors.SeqPointMinDescriptor +jalview.schemabinding.version2.MatchCondition=jalview.schemabinding.version2.descriptors.MatchConditionDescriptor +jalview.schemabinding.version2.SymmMatrix=jalview.schemabinding.version2.descriptors.SymmMatrixDescriptor +jalview.schemabinding.version2.WebServiceParameterSet=jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor jalview.schemabinding.version2.PdbentryItem=jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor -jalview.schemabinding.version2.MapListFrom=jalview.schemabinding.version2.descriptors.MapListFromDescriptor -jalview.schemabinding.version2.FeatureSettings=jalview.schemabinding.version2.descriptors.FeatureSettingsDescriptor -jalview.schemabinding.version2.JGroup=jalview.schemabinding.version2.descriptors.JGroupDescriptor +jalview.schemabinding.version2.Viewport=jalview.schemabinding.version2.descriptors.ViewportDescriptor +jalview.schemabinding.version2.DoubleMatrix=jalview.schemabinding.version2.descriptors.DoubleMatrixDescriptor +jalview.schemabinding.version2.Colour=jalview.schemabinding.version2.descriptors.ColourDescriptor +jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor +jalview.schemabinding.version2.Filter=jalview.schemabinding.version2.descriptors.FilterDescriptor +jalview.schemabinding.version2.MappingChoice=jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor +jalview.schemabinding.version2.Alcodon=jalview.schemabinding.version2.descriptors.AlcodonDescriptor +jalview.schemabinding.version2.UserColourScheme=jalview.schemabinding.version2.descriptors.UserColourSchemeDescriptor jalview.schemabinding.version2.MapListTo=jalview.schemabinding.version2.descriptors.MapListToDescriptor -jalview.schemabinding.version2.JalviewUserColours=jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor -jalview.schemabinding.version2.VamsasModel=jalview.schemabinding.version2.descriptors.VamsasModelDescriptor -jalview.schemabinding.version2.PcaDataType=jalview.schemabinding.version2.descriptors.PcaDataTypeDescriptor -jalview.schemabinding.version2.Pdbentry=jalview.schemabinding.version2.descriptors.PdbentryDescriptor -jalview.schemabinding.version2.HiddenColumns=jalview.schemabinding.version2.descriptors.HiddenColumnsDescriptor -jalview.schemabinding.version2.EigenMatrixE=jalview.schemabinding.version2.descriptors.EigenMatrixEDescriptor -jalview.schemabinding.version2.Features=jalview.schemabinding.version2.descriptors.FeaturesDescriptor -jalview.schemabinding.version2.EigenMatrixD=jalview.schemabinding.version2.descriptors.EigenMatrixDDescriptor -jalview.schemabinding.version2.PairwiseMatrix=jalview.schemabinding.version2.descriptors.PairwiseMatrixDescriptor -jalview.schemabinding.version2.VAMSAS=jalview.schemabinding.version2.descriptors.VAMSASDescriptor -jalview.schemabinding.version2.DoubleVector=jalview.schemabinding.version2.descriptors.DoubleVectorDescriptor -jalview.schemabinding.version2.FeatureMatcher=jalview.schemabinding.version2.descriptors.FeatureMatcherDescriptor +jalview.schemabinding.version2.SequenceType=jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor +jalview.schemabinding.version2.AnnotationElement=jalview.schemabinding.version2.descriptors.AnnotationElementDescriptor +jalview.schemabinding.version2.SeqPointMax=jalview.schemabinding.version2.descriptors.SeqPointMaxDescriptor diff --git a/src/jalview/schemabinding/version2/EigenMatrixD.java b/src/jalview/schemabinding/version2/D.java similarity index 92% rename from src/jalview/schemabinding/version2/EigenMatrixD.java rename to src/jalview/schemabinding/version2/D.java index 16d8729..9ea09d9 100644 --- a/src/jalview/schemabinding/version2/EigenMatrixD.java +++ b/src/jalview/schemabinding/version2/D.java @@ -15,19 +15,18 @@ import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; /** - * Class EigenMatrixD. + * Class D. * * @version $Revision$ $Date$ */ -public class EigenMatrixD extends DoubleVector - implements java.io.Serializable +public class D extends DoubleVector implements java.io.Serializable { // ----------------/ // - Constructors -/ // ----------------/ - public EigenMatrixD() + public D() { super(); } @@ -107,8 +106,7 @@ public class EigenMatrixD extends DoubleVector org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.DoubleVector) Unmarshaller - .unmarshal(jalview.schemabinding.version2.EigenMatrixD.class, - reader); + .unmarshal(jalview.schemabinding.version2.D.class, reader); } /** diff --git a/src/jalview/schemabinding/version2/DoubleMatrix.java b/src/jalview/schemabinding/version2/DoubleMatrix.java index ab21019..04aed99 100644 --- a/src/jalview/schemabinding/version2/DoubleMatrix.java +++ b/src/jalview/schemabinding/version2/DoubleMatrix.java @@ -51,6 +51,16 @@ public class DoubleMatrix implements java.io.Serializable */ private java.util.Vector _rowList; + /** + * Field _d. + */ + private jalview.schemabinding.version2.D _d; + + /** + * Field _e. + */ + private jalview.schemabinding.version2.E _e; + // ----------------/ // - Constructors -/ // ----------------/ @@ -128,6 +138,26 @@ public class DoubleMatrix implements java.io.Serializable } /** + * Returns the value of field 'd'. + * + * @return the value of field 'D'. + */ + public jalview.schemabinding.version2.D getD() + { + return this._d; + } + + /** + * Returns the value of field 'e'. + * + * @return the value of field 'E'. + */ + public jalview.schemabinding.version2.E getE() + { + return this._e; + } + + /** * Method getRow. * * @param index @@ -303,6 +333,28 @@ public class DoubleMatrix implements java.io.Serializable } /** + * Sets the value of field 'd'. + * + * @param d + * the value of field 'd'. + */ + public void setD(final jalview.schemabinding.version2.D d) + { + this._d = d; + } + + /** + * Sets the value of field 'e'. + * + * @param e + * the value of field 'e'. + */ + public void setE(final jalview.schemabinding.version2.E e) + { + this._e = e; + } + + /** * * * @param index diff --git a/src/jalview/schemabinding/version2/DoubleVector.java b/src/jalview/schemabinding/version2/DoubleVector.java index 75597ab..c4d8ff5 100644 --- a/src/jalview/schemabinding/version2/DoubleVector.java +++ b/src/jalview/schemabinding/version2/DoubleVector.java @@ -27,9 +27,9 @@ public class DoubleVector implements java.io.Serializable // --------------------------/ /** - * Field _dList. + * Field _vList. */ - private java.util.Vector _dList; + private java.util.Vector _vList; // ----------------/ // - Constructors -/ @@ -38,7 +38,7 @@ public class DoubleVector implements java.io.Serializable public DoubleVector() { super(); - this._dList = new java.util.Vector(); + this._vList = new java.util.Vector(); } // -----------/ @@ -48,71 +48,71 @@ public class DoubleVector implements java.io.Serializable /** * * - * @param vD + * @param vV * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ - public void addD(final double vD) + public void addV(final double vV) throws java.lang.IndexOutOfBoundsException { - this._dList.addElement(new java.lang.Double(vD)); + this._vList.addElement(new java.lang.Double(vV)); } /** * * * @param index - * @param vD + * @param vV * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ - public void addD(final int index, final double vD) + public void addV(final int index, final double vV) throws java.lang.IndexOutOfBoundsException { - this._dList.add(index, new java.lang.Double(vD)); + this._vList.add(index, new java.lang.Double(vV)); } /** - * Method enumerateD. + * Method enumerateV. * * @return an Enumeration over all double elements */ - public java.util.Enumeration enumerateD() + public java.util.Enumeration enumerateV() { - return this._dList.elements(); + return this._vList.elements(); } /** - * Method getD. + * Method getV. * * @param index * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection * @return the value of the double at the given index */ - public double getD(final int index) + public double getV(final int index) throws java.lang.IndexOutOfBoundsException { // check bounds for index - if (index < 0 || index >= this._dList.size()) + if (index < 0 || index >= this._vList.size()) { - throw new IndexOutOfBoundsException("getD: Index value '" + index - + "' not in range [0.." + (this._dList.size() - 1) + "]"); + throw new IndexOutOfBoundsException("getV: Index value '" + index + + "' not in range [0.." + (this._vList.size() - 1) + "]"); } - return ((java.lang.Double) _dList.get(index)).doubleValue(); + return ((java.lang.Double) _vList.get(index)).doubleValue(); } /** - * Method getD.Returns the contents of the collection in an Array. + * Method getV.Returns the contents of the collection in an Array. * * @return this collection as an Array */ - public double[] getD() + public double[] getV() { - int size = this._dList.size(); + int size = this._vList.size(); double[] array = new double[size]; - java.util.Iterator iter = _dList.iterator(); + java.util.Iterator iter = _vList.iterator(); for (int index = 0; index < size; index++) { array[index] = ((java.lang.Double) iter.next()).doubleValue(); @@ -121,13 +121,13 @@ public class DoubleVector implements java.io.Serializable } /** - * Method getDCount. + * Method getVCount. * * @return the size of this collection */ - public int getDCount() + public int getVCount() { - return this._dList.size(); + return this._vList.size(); } /** @@ -186,32 +186,32 @@ public class DoubleVector implements java.io.Serializable /** */ - public void removeAllD() + public void removeAllV() { - this._dList.clear(); + this._vList.clear(); } /** - * Method removeD. + * Method removeV. * - * @param vD + * @param vV * @return true if the object was removed from the collection. */ - public boolean removeD(final double vD) + public boolean removeV(final double vV) { - boolean removed = _dList.remove(new java.lang.Double(vD)); + boolean removed = _vList.remove(new java.lang.Double(vV)); return removed; } /** - * Method removeDAt. + * Method removeVAt. * * @param index * @return the element removed from the collection */ - public double removeDAt(final int index) + public double removeVAt(final int index) { - java.lang.Object obj = this._dList.remove(index); + java.lang.Object obj = this._vList.remove(index); return ((java.lang.Double) obj).doubleValue(); } @@ -219,36 +219,36 @@ public class DoubleVector implements java.io.Serializable * * * @param index - * @param vD + * @param vV * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ - public void setD(final int index, final double vD) + public void setV(final int index, final double vV) throws java.lang.IndexOutOfBoundsException { // check bounds for index - if (index < 0 || index >= this._dList.size()) + if (index < 0 || index >= this._vList.size()) { - throw new IndexOutOfBoundsException("setD: Index value '" + index - + "' not in range [0.." + (this._dList.size() - 1) + "]"); + throw new IndexOutOfBoundsException("setV: Index value '" + index + + "' not in range [0.." + (this._vList.size() - 1) + "]"); } - this._dList.set(index, new java.lang.Double(vD)); + this._vList.set(index, new java.lang.Double(vV)); } /** * * - * @param vDArray + * @param vVArray */ - public void setD(final double[] vDArray) + public void setV(final double[] vVArray) { // -- copy array - _dList.clear(); + _vList.clear(); - for (int i = 0; i < vDArray.length; i++) + for (int i = 0; i < vVArray.length; i++) { - this._dList.add(new java.lang.Double(vDArray[i])); + this._vList.add(new java.lang.Double(vVArray[i])); } } diff --git a/src/jalview/schemabinding/version2/TridiagonalD.java b/src/jalview/schemabinding/version2/E.java similarity index 93% rename from src/jalview/schemabinding/version2/TridiagonalD.java rename to src/jalview/schemabinding/version2/E.java index 2eb27ca..5daa4dd 100644 --- a/src/jalview/schemabinding/version2/TridiagonalD.java +++ b/src/jalview/schemabinding/version2/E.java @@ -15,19 +15,18 @@ import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; /** - * Class TridiagonalD. + * Class E. * * @version $Revision$ $Date$ */ -public class TridiagonalD extends DoubleVector - implements java.io.Serializable +public class E extends DoubleVector implements java.io.Serializable { // ----------------/ // - Constructors -/ // ----------------/ - public TridiagonalD() + public E() { super(); } @@ -107,8 +106,7 @@ public class TridiagonalD extends DoubleVector org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.DoubleVector) Unmarshaller - .unmarshal(jalview.schemabinding.version2.TridiagonalD.class, - reader); + .unmarshal(jalview.schemabinding.version2.E.class, reader); } /** diff --git a/src/jalview/schemabinding/version2/PcaDataType.java b/src/jalview/schemabinding/version2/PcaDataType.java index 3d05727..42f1723 100644 --- a/src/jalview/schemabinding/version2/PcaDataType.java +++ b/src/jalview/schemabinding/version2/PcaDataType.java @@ -38,25 +38,10 @@ public class PcaDataType implements java.io.Serializable private jalview.schemabinding.version2.TridiagonalMatrix _tridiagonalMatrix; /** - * Field _tridiagonalD. - */ - private jalview.schemabinding.version2.TridiagonalD _tridiagonalD; - - /** - * Field _tridiagonalE. - */ - private jalview.schemabinding.version2.TridiagonalE _tridiagonalE; - - /** * Field _eigenMatrix. */ private jalview.schemabinding.version2.EigenMatrix _eigenMatrix; - /** - * Field _eigenMatrixD. - */ - private jalview.schemabinding.version2.EigenMatrixD _eigenMatrixD; - // ----------------/ // - Constructors -/ // ----------------/ @@ -81,16 +66,6 @@ public class PcaDataType implements java.io.Serializable } /** - * Returns the value of field 'eigenMatrixD'. - * - * @return the value of field 'EigenMatrixD'. - */ - public jalview.schemabinding.version2.EigenMatrixD getEigenMatrixD() - { - return this._eigenMatrixD; - } - - /** * Returns the value of field 'pairwiseMatrix'. * * @return the value of field 'PairwiseMatrix'. @@ -101,26 +76,6 @@ public class PcaDataType implements java.io.Serializable } /** - * Returns the value of field 'tridiagonalD'. - * - * @return the value of field 'TridiagonalD'. - */ - public jalview.schemabinding.version2.TridiagonalD getTridiagonalD() - { - return this._tridiagonalD; - } - - /** - * Returns the value of field 'tridiagonalE'. - * - * @return the value of field 'TridiagonalE'. - */ - public jalview.schemabinding.version2.TridiagonalE getTridiagonalE() - { - return this._tridiagonalE; - } - - /** * Returns the value of field 'tridiagonalMatrix'. * * @return the value of field 'TridiagonalMatrix'. @@ -197,18 +152,6 @@ public class PcaDataType implements java.io.Serializable } /** - * Sets the value of field 'eigenMatrixD'. - * - * @param eigenMatrixD - * the value of field 'eigenMatrixD'. - */ - public void setEigenMatrixD( - final jalview.schemabinding.version2.EigenMatrixD eigenMatrixD) - { - this._eigenMatrixD = eigenMatrixD; - } - - /** * Sets the value of field 'pairwiseMatrix'. * * @param pairwiseMatrix @@ -221,30 +164,6 @@ public class PcaDataType implements java.io.Serializable } /** - * Sets the value of field 'tridiagonalD'. - * - * @param tridiagonalD - * the value of field 'tridiagonalD'. - */ - public void setTridiagonalD( - final jalview.schemabinding.version2.TridiagonalD tridiagonalD) - { - this._tridiagonalD = tridiagonalD; - } - - /** - * Sets the value of field 'tridiagonalE'. - * - * @param tridiagonalE - * the value of field 'tridiagonalE'. - */ - public void setTridiagonalE( - final jalview.schemabinding.version2.TridiagonalE tridiagonalE) - { - this._tridiagonalE = tridiagonalE; - } - - /** * Sets the value of field 'tridiagonalMatrix'. * * @param tridiagonalMatrix diff --git a/src/jalview/schemabinding/version2/TridiagonalE.java b/src/jalview/schemabinding/version2/TridiagonalE.java deleted file mode 100644 index 8a30112..0000000 --- a/src/jalview/schemabinding/version2/TridiagonalE.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * This class was automatically generated with - * Castor 1.1, using an XML - * Schema. - * $Id$ - */ - -package jalview.schemabinding.version2; - -//---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; - -/** - * Class TridiagonalE. - * - * @version $Revision$ $Date$ - */ -public class TridiagonalE extends DoubleVector - implements java.io.Serializable -{ - - // ----------------/ - // - Constructors -/ - // ----------------/ - - public TridiagonalE() - { - super(); - } - - // -----------/ - // - Methods -/ - // -----------/ - - /** - * Method isValid. - * - * @return true if this object is valid according to the schema - */ - public boolean isValid() - { - try - { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) - { - return false; - } - return true; - } - - /** - * - * - * @param out - * @throws org.exolab.castor.xml.MarshalException - * if object is null or if any SAXException is thrown during - * marshaling - * @throws org.exolab.castor.xml.ValidationException - * if this object is an invalid instance according to the schema - */ - public void marshal(final java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException - { - Marshaller.marshal(this, out); - } - - /** - * - * - * @param handler - * @throws java.io.IOException - * if an IOException occurs during marshaling - * @throws org.exolab.castor.xml.ValidationException - * if this object is an invalid instance according to the schema - * @throws org.exolab.castor.xml.MarshalException - * if object is null or if any SAXException is thrown during - * marshaling - */ - public void marshal(final org.xml.sax.ContentHandler handler) - throws java.io.IOException, - org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException - { - Marshaller.marshal(this, handler); - } - - /** - * Method unmarshal. - * - * @param reader - * @throws org.exolab.castor.xml.MarshalException - * if object is null or if any SAXException is thrown during - * marshaling - * @throws org.exolab.castor.xml.ValidationException - * if this object is an invalid instance according to the schema - * @return the unmarshaled jalview.schemabinding.version2.DoubleVector - */ - public static jalview.schemabinding.version2.DoubleVector unmarshal( - final java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException - { - return (jalview.schemabinding.version2.DoubleVector) Unmarshaller - .unmarshal(jalview.schemabinding.version2.TridiagonalE.class, - reader); - } - - /** - * - * - * @throws org.exolab.castor.xml.ValidationException - * if this object is an invalid instance according to the schema - */ - public void validate() throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } - -} diff --git a/src/jalview/schemabinding/version2/descriptors/TridiagonalDDescriptor.java b/src/jalview/schemabinding/version2/descriptors/DDescriptor.java similarity index 91% rename from src/jalview/schemabinding/version2/descriptors/TridiagonalDDescriptor.java rename to src/jalview/schemabinding/version2/descriptors/DDescriptor.java index 50d76c6..6eb4b59 100644 --- a/src/jalview/schemabinding/version2/descriptors/TridiagonalDDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/DDescriptor.java @@ -11,14 +11,14 @@ package jalview.schemabinding.version2.descriptors; //- Imported classes and packages -/ //---------------------------------/ -import jalview.schemabinding.version2.TridiagonalD; +import jalview.schemabinding.version2.D; /** - * Class TridiagonalDDescriptor. + * Class DDescriptor. * * @version $Revision$ $Date$ */ -public class TridiagonalDDescriptor extends +public class DDescriptor extends jalview.schemabinding.version2.descriptors.DoubleVectorDescriptor { @@ -50,13 +50,13 @@ public class TridiagonalDDescriptor extends // - Constructors -/ // ----------------/ - public TridiagonalDDescriptor() + public DDescriptor() { super(); setExtendsWithoutFlatten( new jalview.schemabinding.version2.descriptors.DoubleVectorDescriptor()); _nsURI = "www.jalview.org"; - _xmlName = "tridiagonalD"; + _xmlName = "D"; _elementDefinition = true; } @@ -91,7 +91,7 @@ public class TridiagonalDDescriptor extends */ public java.lang.Class getJavaClass() { - return jalview.schemabinding.version2.TridiagonalD.class; + return jalview.schemabinding.version2.D.class; } /** diff --git a/src/jalview/schemabinding/version2/descriptors/DoubleMatrixDescriptor.java b/src/jalview/schemabinding/version2/descriptors/DoubleMatrixDescriptor.java index 79245bc..f2d197b 100644 --- a/src/jalview/schemabinding/version2/descriptors/DoubleMatrixDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/DoubleMatrixDescriptor.java @@ -231,6 +231,88 @@ public class DoubleMatrixDescriptor { // -- local scope } desc.setValidator(fieldValidator); + // -- _d + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + jalview.schemabinding.version2.D.class, "_d", "D", + org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + DoubleMatrix target = (DoubleMatrix) object; + return target.getD(); + } + + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + DoubleMatrix target = (DoubleMatrix) object; + target.setD((jalview.schemabinding.version2.D) value); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return new jalview.schemabinding.version2.D(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- validation code for: _d + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { // -- local scope + } + desc.setValidator(fieldValidator); + // -- _e + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( + jalview.schemabinding.version2.E.class, "_e", "E", + org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() + { + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + DoubleMatrix target = (DoubleMatrix) object; + return target.getE(); + } + + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + DoubleMatrix target = (DoubleMatrix) object; + target.setE((jalview.schemabinding.version2.E) value); + } catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); + } + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return new jalview.schemabinding.version2.E(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + // -- validation code for: _e + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { // -- local scope + } + desc.setValidator(fieldValidator); } // -----------/ diff --git a/src/jalview/schemabinding/version2/descriptors/DoubleVectorDescriptor.java b/src/jalview/schemabinding/version2/descriptors/DoubleVectorDescriptor.java index 3d8c315..488ef8c 100644 --- a/src/jalview/schemabinding/version2/descriptors/DoubleVectorDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/DoubleVectorDescriptor.java @@ -66,9 +66,9 @@ public class DoubleVectorDescriptor // -- initialize element descriptors - // -- _dList + // -- _vList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.Double.TYPE, "_dList", "d", + java.lang.Double.TYPE, "_vList", "v", org.exolab.castor.xml.NodeType.Element); handler = new org.exolab.castor.xml.XMLFieldHandler() { @@ -76,7 +76,7 @@ public class DoubleVectorDescriptor throws IllegalStateException { DoubleVector target = (DoubleVector) object; - return target.getD(); + return target.getV(); } public void setValue(java.lang.Object object, java.lang.Object value) @@ -91,7 +91,7 @@ public class DoubleVectorDescriptor return; } - target.addD(((java.lang.Double) value).doubleValue()); + target.addV(((java.lang.Double) value).doubleValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); @@ -104,7 +104,7 @@ public class DoubleVectorDescriptor try { DoubleVector target = (DoubleVector) object; - target.removeAllD(); + target.removeAllV(); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); @@ -121,7 +121,7 @@ public class DoubleVectorDescriptor desc.setMultivalued(true); addFieldDescriptor(desc); - // -- validation code for: _dList + // -- validation code for: _vList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); { // -- local scope diff --git a/src/jalview/schemabinding/version2/descriptors/TridiagonalEDescriptor.java b/src/jalview/schemabinding/version2/descriptors/EDescriptor.java similarity index 91% rename from src/jalview/schemabinding/version2/descriptors/TridiagonalEDescriptor.java rename to src/jalview/schemabinding/version2/descriptors/EDescriptor.java index 117cb71..b35c3ed 100644 --- a/src/jalview/schemabinding/version2/descriptors/TridiagonalEDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/EDescriptor.java @@ -11,14 +11,14 @@ package jalview.schemabinding.version2.descriptors; //- Imported classes and packages -/ //---------------------------------/ -import jalview.schemabinding.version2.TridiagonalE; +import jalview.schemabinding.version2.E; /** - * Class TridiagonalEDescriptor. + * Class EDescriptor. * * @version $Revision$ $Date$ */ -public class TridiagonalEDescriptor extends +public class EDescriptor extends jalview.schemabinding.version2.descriptors.DoubleVectorDescriptor { @@ -50,13 +50,13 @@ public class TridiagonalEDescriptor extends // - Constructors -/ // ----------------/ - public TridiagonalEDescriptor() + public EDescriptor() { super(); setExtendsWithoutFlatten( new jalview.schemabinding.version2.descriptors.DoubleVectorDescriptor()); _nsURI = "www.jalview.org"; - _xmlName = "tridiagonalE"; + _xmlName = "E"; _elementDefinition = true; } @@ -91,7 +91,7 @@ public class TridiagonalEDescriptor extends */ public java.lang.Class getJavaClass() { - return jalview.schemabinding.version2.TridiagonalE.class; + return jalview.schemabinding.version2.E.class; } /** diff --git a/src/jalview/schemabinding/version2/descriptors/EigenMatrixDDescriptor.java b/src/jalview/schemabinding/version2/descriptors/EigenMatrixDDescriptor.java deleted file mode 100644 index b9ca070..0000000 --- a/src/jalview/schemabinding/version2/descriptors/EigenMatrixDDescriptor.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * This class was automatically generated with - * Castor 1.1, using an XML - * Schema. - * $Id$ - */ - -package jalview.schemabinding.version2.descriptors; - -//---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import jalview.schemabinding.version2.EigenMatrixD; - -/** - * Class EigenMatrixDDescriptor. - * - * @version $Revision$ $Date$ - */ -public class EigenMatrixDDescriptor extends - jalview.schemabinding.version2.descriptors.DoubleVectorDescriptor -{ - - // --------------------------/ - // - Class/Member Variables -/ - // --------------------------/ - - /** - * Field _elementDefinition. - */ - private boolean _elementDefinition; - - /** - * Field _nsPrefix. - */ - private java.lang.String _nsPrefix; - - /** - * Field _nsURI. - */ - private java.lang.String _nsURI; - - /** - * Field _xmlName. - */ - private java.lang.String _xmlName; - - // ----------------/ - // - Constructors -/ - // ----------------/ - - public EigenMatrixDDescriptor() - { - super(); - setExtendsWithoutFlatten( - new jalview.schemabinding.version2.descriptors.DoubleVectorDescriptor()); - _nsURI = "www.jalview.org"; - _xmlName = "eigenMatrixD"; - _elementDefinition = true; - } - - // -----------/ - // - Methods -/ - // -----------/ - - /** - * Method getAccessMode. - * - * @return the access mode specified for this class. - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } - - /** - * Method getIdentity. - * - * @return the identity field, null if this class has no identity. - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return super.getIdentity(); - } - - /** - * Method getJavaClass. - * - * @return the Java class represented by this descriptor. - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.EigenMatrixD.class; - } - - /** - * Method getNameSpacePrefix. - * - * @return the namespace prefix to use when marshaling as XML. - */ - public java.lang.String getNameSpacePrefix() - { - return _nsPrefix; - } - - /** - * Method getNameSpaceURI. - * - * @return the namespace URI used when marshaling and unmarshaling as XML. - */ - public java.lang.String getNameSpaceURI() - { - return _nsURI; - } - - /** - * Method getValidator. - * - * @return a specific validator for the class described by this - * ClassDescriptor. - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } - - /** - * Method getXMLName. - * - * @return the XML Name for the Class being described. - */ - public java.lang.String getXMLName() - { - return _xmlName; - } - - /** - * Method isElementDefinition. - * - * @return true if XML schema definition of this Class is that of a global - * element or element with anonymous type definition. - */ - public boolean isElementDefinition() - { - return _elementDefinition; - } - -} diff --git a/src/jalview/schemabinding/version2/descriptors/PcaDataTypeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PcaDataTypeDescriptor.java index f864feb..49ad090 100644 --- a/src/jalview/schemabinding/version2/descriptors/PcaDataTypeDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/PcaDataTypeDescriptor.java @@ -156,96 +156,6 @@ public class PcaDataTypeDescriptor { // -- local scope } desc.setValidator(fieldValidator); - // -- _tridiagonalD - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - jalview.schemabinding.version2.TridiagonalD.class, - "_tridiagonalD", "tridiagonalD", - org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - PcaDataType target = (PcaDataType) object; - return target.getTridiagonalD(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - PcaDataType target = (PcaDataType) object; - target.setTridiagonalD( - (jalview.schemabinding.version2.TridiagonalD) value); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.TridiagonalD(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _tridiagonalD - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { // -- local scope - } - desc.setValidator(fieldValidator); - // -- _tridiagonalE - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - jalview.schemabinding.version2.TridiagonalE.class, - "_tridiagonalE", "tridiagonalE", - org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - PcaDataType target = (PcaDataType) object; - return target.getTridiagonalE(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - PcaDataType target = (PcaDataType) object; - target.setTridiagonalE( - (jalview.schemabinding.version2.TridiagonalE) value); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.TridiagonalE(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _tridiagonalE - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { // -- local scope - } - desc.setValidator(fieldValidator); // -- _eigenMatrix desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( jalview.schemabinding.version2.EigenMatrix.class, @@ -291,51 +201,6 @@ public class PcaDataTypeDescriptor { // -- local scope } desc.setValidator(fieldValidator); - // -- _eigenMatrixD - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - jalview.schemabinding.version2.EigenMatrixD.class, - "_eigenMatrixD", "eigenMatrixD", - org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - PcaDataType target = (PcaDataType) object; - return target.getEigenMatrixD(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - PcaDataType target = (PcaDataType) object; - target.setEigenMatrixD( - (jalview.schemabinding.version2.EigenMatrixD) value); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.EigenMatrixD(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - // -- validation code for: _eigenMatrixD - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { // -- local scope - } - desc.setValidator(fieldValidator); } // -----------/ -- 1.7.10.2