本文整理汇总了C#中ISdmxObjects类的典型用法代码示例。如果您正苦于以下问题:C# ISdmxObjects类的具体用法?C# ISdmxObjects怎么用?C# ISdmxObjects使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISdmxObjects类属于命名空间,在下文中一共展示了ISdmxObjects类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AgencyMetadataImpl
/// <summary>
/// Initializes a new instance of the <see cref="AgencyMetadataImpl"/> class.
/// </summary>
/// <param name="agencyId">
/// The agency id.
/// </param>
/// <param name="objects">
/// The objects.
/// </param>
public AgencyMetadataImpl(string agencyId, ISdmxObjects objects)
{
this._structureMap = new Dictionary<SdmxStructureEnumType, int>();
this._agencyId = agencyId;
this._structureMap.Add(SdmxStructureEnumType.AgencyScheme, objects.GetAgenciesScheme(agencyId) == null ? 0 : 1);
this._structureMap.Add(
SdmxStructureEnumType.AttachmentConstraint, objects.GetAttachmentConstraints(agencyId).Count);
this._structureMap.Add(
SdmxStructureEnumType.ContentConstraint, objects.GetContentConstraintObjects(agencyId).Count);
this._structureMap.Add(
SdmxStructureEnumType.DataProviderScheme, objects.GetDataProviderScheme(agencyId) == null ? 0 : 1);
this._structureMap.Add(
SdmxStructureEnumType.DataConsumerScheme, objects.GetDataConsumerScheme(agencyId) == null ? 0 : 1);
this._structureMap.Add(
SdmxStructureEnumType.OrganisationUnitScheme, objects.GetOrganisationUnitSchemes(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.Categorisation, objects.GetCategorisations(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.Dataflow, objects.GetDataflows(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.MetadataFlow, objects.GetMetadataflows(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.CategoryScheme, objects.GetCategorySchemes(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.ConceptScheme, objects.GetConceptSchemes(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.CodeList, objects.GetCodelists(agencyId).Count);
this._structureMap.Add(
SdmxStructureEnumType.HierarchicalCodelist, objects.GetHierarchicalCodelists(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.Msd, objects.GetMetadataStructures(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.Dsd, objects.GetDataStructures(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.Process, objects.GetProcesses(agencyId).Count);
this._structureMap.Add(
SdmxStructureEnumType.ReportingTaxonomy, objects.GetReportingTaxonomys(agencyId).Count);
this._structureMap.Add(SdmxStructureEnumType.StructureSet, objects.GetStructureSets(agencyId).Count);
this._structureMap.Add(
SdmxStructureEnumType.ProvisionAgreement, objects.GetProvisionAgreements(agencyId).Count);
}
示例2: BuildRegistryInterfaceDocument
/// <summary>
/// The build registry interface document.
/// </summary>
/// <param name="buildFrom">
/// The build from.
/// </param>
/// <param name="action">
/// The action.
/// </param>
/// <returns>
/// The <see cref="RegistryInterface"/>.
/// </returns>
public RegistryInterface BuildRegistryInterfaceDocument(ISdmxObjects buildFrom, DatasetAction action)
{
var rid = new RegistryInterface();
RegistryInterfaceType rit = rid.Content;
V21Helper.Header = rit;
var structureRequestType = new SubmitStructureRequestType();
rit.SubmitStructureRequest = structureRequestType;
switch (action.EnumType)
{
case DatasetActionEnumType.Append:
structureRequestType.action = ActionTypeConstants.Append;
break;
case DatasetActionEnumType.Replace:
structureRequestType.action = ActionTypeConstants.Replace;
break;
case DatasetActionEnumType.Delete:
structureRequestType.action = ActionTypeConstants.Delete;
break;
case DatasetActionEnumType.Information:
structureRequestType.action = ActionTypeConstants.Information;
break;
}
var structures = new Structures();
structureRequestType.Structures = structures;
this._structureXmlBuilder.PopulateStructureType(buildFrom, structures.Content);
return rid;
}
示例3: SetHeader
/// <summary>
/// Sets the header.
/// </summary>
/// <param name="header">
/// The header.
/// </param>
/// <param name="sdmxObjects">
/// The beans.
/// </param>
public static void SetHeader(HeaderType header, ISdmxObjects sdmxObjects)
{
header.ID = "IDREF" + refNumber;
refNumber++;
header.Test = false;
header.Prepared = DateTime.Now;
var sender = new PartyType();
header.Sender.Add(sender);
string senderId;
if (sdmxObjects != null && sdmxObjects.Header != null && sdmxObjects.Header.Sender != null)
{
// Get header information from the supplied beans
senderId = sdmxObjects.Header.Sender.Id;
}
else
{
// Get header info from HeaderHelper
senderId = HeaderHelper.Instance.SenderId;
}
sender.id = senderId;
var receiver = new PartyType();
header.Receiver.Add(receiver);
receiver.id = HeaderHelper.Instance.ReceiverId;
}
示例4: DataSetModelStore
/// <summary>
/// Initializes a new instance of the <see cref="DataSetModelStore"/> class.
/// Initialize a new instance of the <see cref="DataSetModelStore"/>
/// </summary>
/// <param name="structure">
/// The SDMX structure file
/// </param>
/// <param name="store">
/// The <see cref="IDataSetStore"/>
/// </param>
public DataSetModelStore(ISdmxObjects structure, IDataSetStore store)
: base(structure, store)
{
if (store == null)
{
throw new ArgumentNullException("store");
}
}
示例5: WriteStructures
public void WriteStructures(ISdmxObjects sdmxObjects)
{
foreach (var maintainableObject in sdmxObjects.GetAllMaintainables())
{
PrintMaintainable(maintainableObject);
}
Close();
}
示例6: AddIfNotDuplicateURN
/// <summary>
/// Adds a bean to the container as long as the urn of the bean to add is not contained in the set of URNs.
/// <p/>
/// If successfully added, will add the bean urn to the set of urns
/// </summary>
/// <param name="beans">
/// container to add to
/// </param>
/// <param name="urns">
/// to exclude
/// </param>
/// <param name="bean">
/// to add to the beans container
/// </param>
protected internal void AddIfNotDuplicateURN(ISdmxObjects beans, ISet<Uri> urns, IIdentifiableObject bean)
{
if (!urns.Add(bean.Urn))
{
throw new SdmxSemmanticException(ExceptionCode.DuplicateUrn, bean.Urn);
}
beans.AddIdentifiable(bean);
}
示例7: WriteStructures
/// <summary>
/// The write structures.
/// </summary>
/// <param name="beans">
/// The beans.
/// </param>
/// <exception cref="NotImplementedException">
/// SDMX EDI for structures is not implemented in this implementation.
/// </exception>
public virtual void WriteStructures(ISdmxObjects beans)
{
throw new NotImplementedException("SDMX EDI for structures is not implemented in this implementation.");
////if (editParseManager == null) {
//// throw new Exception(
//// "Required dependancy 'structureReaderEngine' is null, StructureWriterEngineEdi is @Configurable and requires '<context:spring-configured />' to be set");
////}
////editParseManager.WriteToEDI(beans, xout);
}
示例8: ResolveReferences
/// <summary>
/// </summary>
/// <param name="structures"> The structures</param>
/// <param name="resolveAgencies"> Flag indicating resolve agencies .</param>
/// <param name="resolutionDepth"> The resolution depth. </param>
/// <param name="retrievalManager"> The retrieval manager </param>
/// <returns> The references </returns>
public IDictionary<IIdentifiableObject, ISet<IIdentifiableObject>> ResolveReferences(
ISdmxObjects structures,
bool resolveAgencies,
int resolutionDepth,
IIdentifiableRetrievalManager retrievalManager)
{
ICrossReferenceResolverEngine crossReferenceResolver = new CrossReferenceResolverEngineCore();
return crossReferenceResolver.ResolveReferences(
structures, resolveAgencies, resolutionDepth, retrievalManager);
}
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:17,代码来源:CrossReferenceReversionEngine.cs
示例9: BuildSuccessResponse
/// <summary>
/// The build success response.
/// </summary>
/// <param name="beans">
/// The beans.
/// </param>
/// <returns>
/// The <see cref="RegistryInterface"/>.
/// </returns>
public RegistryInterface BuildSuccessResponse(ISdmxObjects beans)
{
var responseType = new RegistryInterface();
RegistryInterfaceType regInterface = responseType.Content;
regInterface.Header = this._headerXmlsBuilder.Build(beans.Header);
var returnType = new SubmitStructureResponseType();
regInterface.SubmitStructureResponse = returnType;
this.ProcessMaintainables(returnType, beans.GetAllMaintainables());
return responseType;
}
示例10: DataRender
public DataRender(IDataSetStore store, List<DataCriteria> Criterias, LayoutObj layObj, ISdmxObjects structure, ComponentCodeDescriptionDictionary codemap, bool useAttr, CultureInfo cFrom, CultureInfo cTo)
{
this.store = store;
this.Criterias = Criterias;
this.layObj = layObj;
this.Structure = structure;
this.codemap = codemap;
this._useAttr=useAttr;
this.cFrom=cFrom;
this.cTo=cTo;
}
示例11: Build
/// <summary>
/// Builds Mutable beans from a collection of beans
/// </summary>
/// <param name="buildFrom">
/// beans to build from
/// </param>
/// <returns>
/// Mutable bean copies
/// </returns>
/// <exception cref="BuilderException">
/// - If anything goes wrong during the build process
/// </exception>
public virtual IMutableObjects Build(ISdmxObjects buildFrom)
{
IMutableObjects mutableBeans = new MutableObjectsImpl();
/* foreach */
foreach (IMaintainableObject currentMaintainable in buildFrom.GetAllMaintainables())
{
mutableBeans.AddIdentifiable(currentMaintainable.MutableInstance);
}
return mutableBeans;
}
示例12: GetAgencySchemeList
public List<AgencyScheme> GetAgencySchemeList(ISdmxObjects sdmxObjects, string localization)
{
if (sdmxObjects == null || sdmxObjects.AgenciesSchemes == null)
return null;
List<AgencyScheme> lAS = new List<AgencyScheme>();
foreach (IAgencyScheme agency in sdmxObjects.AgenciesSchemes)
{
lAS.Add(new AgencyScheme(_localizedUtils.GetNameableName(agency), agency.Id, agency.AgencyId, agency.Version, agency.IsFinal.IsTrue));
}
return lAS;
}
示例13: SaveSDMXFile
public void SaveSDMXFile(ISdmxObjects sdmxObjects, StructureOutputFormatEnumType version, string outputFileName)
{
StructureWriterManager swm = new StructureWriterManager();
StructureOutputFormat soFormat = StructureOutputFormat.GetFromEnum(version);
IStructureFormat outputFormat = new SdmxStructureFormat(soFormat);
MemoryStream memoryStream = new MemoryStream();
swm.WriteStructures(sdmxObjects, outputFormat, memoryStream);
byte[] bytesInStream = memoryStream.ToArray();
memoryStream.Close();
SendAttachment(bytesInStream, outputFileName + ".xml");
}
示例14: SetHeader
/// <summary>
/// The set header.
/// </summary>
/// <param name="header">
/// The header.
/// </param>
/// <param name="sdmxObjects">
/// The sdmxObjects.
/// </param>
public static void SetHeader(HeaderType header, ISdmxObjects sdmxObjects)
{
header.ID = "IDREF" + referenceNo;
referenceNo++;
header.Test = false;
header.Prepared = DateTime.Now;
string senderId;
if (sdmxObjects != null && sdmxObjects.Header != null && sdmxObjects.Header.Sender != null)
{
// Get header information from the supplied sdmxObjects
senderId = sdmxObjects.Header.Sender.Id;
}
else
{
// Get header info from HeaderHelper
senderId = HeaderHelper.Instance.SenderId;
}
header.Sender.id = senderId;
}
示例15: SetHeader
/// <summary>
/// set the header.
/// </summary>
/// <param name="header">
/// The header.
/// </param>
/// <param name="beans">
/// The beans.
/// </param>
/// <param name="receivers">
/// The receivers.
/// </param>
public static void SetHeader(BaseHeaderType header, ISdmxObjects beans, params string[] receivers)
{
header.ID = "IDREF" + refNumber;
refNumber++;
header.Test = false;
header.Prepared = DateTime.Now;
var sender = new SenderType();
header.Sender = sender;
string senderId;
if (beans != null && beans.Header != null && beans.Header.Sender != null)
{
// Get header information from the supplied beans
senderId = beans.Header.Sender.Id;
}
else
{
// Get header info from HeaderHelper
senderId = HeaderHelper.Instance.SenderId;
}
sender.id = senderId;
if (ObjectUtil.ValidArray(receivers))
{
/* foreach */
foreach (string currentReviever in receivers)
{
var receiver = new PartyType();
header.Receiver.Add(receiver);
receiver.id = currentReviever;
}
}
else
{
var receiver0 = new PartyType();
header.Receiver.Add(receiver0);
receiver0.id = HeaderHelper.Instance.ReceiverId;
}
}