/// <summary> /// Create a data reader based on an xml data reader. This mathod looks into the first element /// and creates the right reader (Generic, Compact, Utility, CrossSectional). /// </summary> /// <param name="reader">The reader.</param> /// <param name="keyFamily">The key family.</param> /// <returns>An instance of the DataReader.</returns> public static DataReader Create(XmlReader reader, KeyFamily keyFamily) { Contract.AssertNotNull(reader, "reader"); if (reader.ReadState == ReadState.Initial) { reader.Read(); } if (reader.NodeType != XmlNodeType.Element) { reader.ReadNextStartElement(); } if (reader.LocalName == "CompactData") { return(new CompactDataReader(reader, keyFamily)); } else if (reader.LocalName == "GenericData") { return(new GenericDataReader(reader, keyFamily)); } else { throw new SDMXException("Unsupported root element ({0}) for data file.", reader.LocalName); } }
internal Group(Id id, KeyFamily keyFamily) { Contract.AssertNotNull(id, "id"); Contract.AssertNotNull(keyFamily, "keyFamily"); Id = id; KeyFamily = keyFamily; Description = new InternationalText(); }
public DataWriter(StringBuilder stringBuilder, KeyFamily keyFamily) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(stringBuilder, new XmlWriterSettings() { Indent = true }); _validator = new DataValidator(keyFamily); }
public DataWriter(TextWriter textWriter, KeyFamily keyFamily) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(textWriter, new XmlWriterSettings() { Indent = true }); _validator = new DataValidator(keyFamily); }
public DataValidator(KeyFamily keyFamily) { KeyFamily = keyFamily; }
public CompactDataWriter(Stream stream, KeyFamily keyFamily, XmlWriterSettings settings, string prefix, string targetNamespace) : base(stream, keyFamily, settings) { _prefix = prefix; _targetNamespace = targetNamespace; }
public CompactDataWriter(XmlWriter writer, KeyFamily keyFamily, string prefix, string targetNamespace) : base(writer, keyFamily) { _prefix = prefix; _targetNamespace = targetNamespace; }
public DataWriter(string path, KeyFamily keyFamily, XmlWriterSettings settings) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(path, settings); _validator = new DataValidator(keyFamily); }
public DataWriter(TextWriter textWriter, KeyFamily keyFamily, XmlWriterSettings settings) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(textWriter, settings); _validator = new DataValidator(keyFamily); }
public GenericDataWriter(Stream stream, KeyFamily keyFamily, XmlWriterSettings settings) : base(stream, keyFamily, settings) { }
public GenericDataWriter(string path, KeyFamily keyFamily, XmlWriterSettings settings) : base(path, keyFamily, settings) { }
public GenericDataWriter(TextWriter textWriter, KeyFamily keyFamily) : base(textWriter, keyFamily) { }
public GenericDataWriter(StringBuilder stringBuilder, KeyFamily keyFamily) : base(stringBuilder, keyFamily) { }
public GenericDataWriter(XmlWriter writer, KeyFamily keyFamily) : base(writer, keyFamily) { }
public GenericDataWriter(Stream stream, KeyFamily keyFamily) : base(stream, keyFamily) { }
public GenericDataWriter(string path, KeyFamily keyFamily) : base(path, keyFamily) { }
internal DataReader(XmlReader reader, KeyFamily keyFamily) { XmlReader = reader; KeyFamily = keyFamily; ThrowExceptionIfNotValid = true; }
public GenericDataWriter(StringBuilder stringBuilder, KeyFamily keyFamily, XmlWriterSettings settings) : base(stringBuilder, keyFamily, settings) { }
public DataWriter(XmlWriter writer, KeyFamily keyFamily) { KeyFamily = keyFamily; XmlWriter = writer; _validator = new DataValidator(keyFamily); }
public GenericDataWriter(TextWriter textWriter, KeyFamily keyFamily, XmlWriterSettings settings) : base(textWriter, keyFamily, settings) { }
public MessageGroupReader(string fileName, KeyFamily keyFamily) : this(XmlReader.Create(fileName), keyFamily) { }
public MessageGroupReader(Stream stream, KeyFamily keyFamily) : this(XmlReader.Create(stream), keyFamily) { }
public DataWriter(StringBuilder stringBuilder, KeyFamily keyFamily, XmlWriterSettings settings) { KeyFamily = keyFamily; XmlWriter = XmlWriter.Create(stringBuilder, settings); _validator = new DataValidator(keyFamily); }
public MessageGroupReader(XmlReader xmlReader, KeyFamily keyFamily) { XmlReader = xmlReader; KeyFamily = keyFamily; ThrowExceptionIfNotValid = true; }
public CompactDataWriter(string path, KeyFamily keyFamily, string prefix, string targetNamespace) : base(path, keyFamily) { _prefix = prefix; _targetNamespace = targetNamespace; }
/// <summary> /// Create a data reader based on the type of the file. This mathod looks into the first element of the file /// and creates the right reader (Generic, Compact, Utility, CrossSectional). /// </summary> /// <param name="fileName">The file name.</param> /// <param name="keyFamily">The key family.</param> /// <returns>An instance of the DataReader.</returns> public static DataReader Create(string fileName, KeyFamily keyFamily) { Contract.AssertNotNullOrEmpty(fileName, "fileName"); return(Create(XmlReader.Create(fileName), keyFamily)); }
public CompactDataWriter(StringBuilder stringBuilder, KeyFamily keyFamily, string prefix, string targetNamespace) : base(stringBuilder, keyFamily) { _prefix = prefix; _targetNamespace = targetNamespace; }
/// <summary> /// Create a data reader based on the type of the stream. This mathod looks into the first element of the stream /// and creates the right reader (Generic, Compact, Utility, CrossSectional). /// </summary> /// <param name="stream">The stream.</param> /// <param name="keyFamily">The key family.</param> /// <returns>An instance of the DataReader.</returns> public static DataReader Create(Stream stream, KeyFamily keyFamily) { Contract.AssertNotNull(stream, "stream"); return(Create(XmlReader.Create(stream), keyFamily)); }
public CompactDataWriter(TextWriter textWriter, KeyFamily keyFamily, XmlWriterSettings settings, string prefix, string targetNamespace) : base(textWriter, keyFamily, settings) { _prefix = prefix; _targetNamespace = targetNamespace; }
public CompactDataReader(XmlReader xmlReader, KeyFamily keyFamily) : base(xmlReader, keyFamily) { }