/** * Generates a ArchiveDetailsList structure with one ArchiveDetails object. * The object instance identifier will be set as 0. The operation will use * the submitted related, source, network and provider fields to fill-in the * object. The fields network and provider are not set. * * @param related Related field * @param source Source field * @param network Network field * @param provider Provider field * @return The ArchiveDetailsList object */ public static ArchiveDetailsList generateArchiveDetailsList(final Long related, final ObjectId source, final Identifier network, final URI provider) { final ArchiveDetails archiveDetails = new ArchiveDetails(); archiveDetails.setInstId(new Long(0)); archiveDetails.setDetails(new ObjectDetails(related, source)); archiveDetails.setNetwork(network); archiveDetails.setTimestamp(HelperTime.getTimestamp()); archiveDetails.setProvider(provider); final ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(archiveDetails); return archiveDetailsList; }
public COMObjectStructure(final IdentifierList domain, final ObjectType objType, final ArchiveDetails archiveDetails, final Element object) { this.objType = objType; this.domain = domain; this.objId = archiveDetails.getInstId(); this.sourceLink = archiveDetails.getDetails().getSource(); this.relatedLink = archiveDetails.getDetails().getRelated(); this.network = archiveDetails.getNetwork(); this.timestamp = archiveDetails.getTimestamp(); this.providerURI = archiveDetails.getProvider(); this.object = object; }
/** * Checks if the archiveDetails structure contains a null value in any of * the following fields: network, timestamp or provider * * @param archiveDetails The archive details object to be checked. * @return The boolean value of the comparison */ public static Boolean archiveDetailsContainsNull(ArchiveDetails archiveDetails) { // Check if null return archiveDetails.getNetwork().getValue() == null || archiveDetails.getTimestamp() == null || archiveDetails.getProvider().getValue() == null; }
archiveDetails.get(0).setInstId(objId); // requirement: 3.5.2.4 archiveDetails.get(0).setNetwork(interaction.getMessageHeader().getNetworkZone()); // RID raised to create this requirement! archiveDetails.get(0).setProvider(interaction.getMessageHeader().getURIFrom()); // RID raised to create this requirement!
/** * Creates an instance of this type using the default constructor. It is a generic factory method. * @return A new instance of this type with default field values. */ public org.ccsds.moims.mo.mal.structures.Element createElement() { return new org.ccsds.moims.mo.com.archive.structures.ArchiveDetails(); }
if (defArchiveDetails.getDetails().getRelated() == null) continue; if (defArchiveDetails.getDetails().getRelated().equals(identityId)) { final long itemTimestamp = defArchiveDetails.getTimestamp().getValue(); if (itemTimestamp > maxTimeStamp) { defId = defArchiveDetails.getInstId(); maxTimeStamp = itemTimestamp;
ConfigurationHelper.CONFIGURATIONOBJECTS_OBJECT_TYPE, confId.getKey().getDomain(), comObjectProvider.getArchiveDetails().getDetails().getRelated()); objIds = ((ConfigurationObjectDetails) comObjectConfs.getObject()).getConfigObjects().get(0).getObjInstIds(); return; details.get(0).setInstId(confId.getKey().getInstId()); IdentifierList providerNameList = new IdentifierList(1); providerNameList.add(provider.getProviderName());
/** * Generates a ArchiveDetailsList structure with one ArchiveDetails object. * The object instance identifier will be set as 0. The operation will use * the submitted related, source, network, provider and objId fields to * fill-in the object. The fields network and provider are not set. * * @param related Related field * @param source Source field * @param network Network field * @param provider Provider field * @param objId Object instance identifier field * @return The ArchiveDetailsList object */ public static ArchiveDetailsList generateArchiveDetailsList(final Long related, final ObjectId source, final Identifier network, final URI provider, final Long objId) { final ArchiveDetailsList archiveDetailsList = HelperArchive.generateArchiveDetailsList( related, source, network, provider ); archiveDetailsList.get(0).setInstId(objId); return archiveDetailsList; }
public static UIntegerList checkForDuplicates(ArchiveDetailsList archiveDetailsList) { UIntegerList dupList = new UIntegerList(); for (int i = 0; i < archiveDetailsList.size() - 1; i++) { if (archiveDetailsList.get(i).getInstId().intValue() == 0) { // Wildcard? Then jump over it continue; } for (int j = i + 1; j < archiveDetailsList.size(); j++) { if (archiveDetailsList.get(i).getInstId().intValue() == archiveDetailsList.get(j).getInstId().intValue()) { dupList.add(new UInteger(j)); } } } return dupList; }
relateds.add(comObject.getArchiveDetails().getDetails().getRelated());
if (latestPerObj.getArchiveDetails().getTimestamp().getValue() < perObj.getArchiveDetails().getTimestamp().getValue()) {
/** * Creates an instance of the source type using the default constructor. It is a generic factory method. * @return A new instance of the source type with default field values. */ public org.ccsds.moims.mo.mal.structures.Element createElement() { return new org.ccsds.moims.mo.com.archive.structures.ArchiveDetails(); }
if (groupIdentityId.equals(groupDefDetails.getDetails().getRelated())) { groupDefsReferencingGroupIdentity.add(groupDefDetails); for (int i = 0; i < groupDefsReferencingGroupIdentity.size(); i++) { ArchiveDetails groupDefDetails = groupDefsReferencingGroupIdentity.get(i); if (groupDefDetails.getTimestamp().getValue() > latestTimestamp) { latestDefIndex = i; latestTimestamp = groupDefDetails.getTimestamp().getValue(); long latestGroupDefId = groupDefsReferencingGroupIdentity.get(latestDefIndex).getInstId(); return latestGroupDefId;
/** * Checks if the archiveDetails structure contains a wildcard in any of the * following fields: network, timestamp or provider Null, "*" and 0 are * considered wildcards * * @param archiveDetails The archive details object to be checked. * @return The boolean value of the comparison */ public static Boolean archiveDetailsContainsWildcard(ArchiveDetails archiveDetails) { if (archiveDetails == null) { return false; } // Check for nulls if (archiveDetails.getNetwork() == null || archiveDetails.getTimestamp() == null || archiveDetails.getProvider() == null) { return true; } // Check if any of them have a wildcard if (archiveDetails.getNetwork().getValue().equals("*")) { return true; } if (archiveDetails.getTimestamp().getValue() == 0) { return true; } if (archiveDetails.getProvider().getValue().equals("*")) { return true; } return false; }
archDetails.get(0).setInstId(objId);
ArchiveDetails tmpArchiveDetails = lArchiveDetailsList.get(index); if (tmpArchiveDetails.getInstId() == 0) { // requirement: 3.4.7.2.8 (second part) invIndexList.add(new UInteger(index)); continue; if (!manager.objIdExists(lObjectType, domain, tmpArchiveDetails.getInstId())) { // requirement: 3.4.7.2.4 unkIndexList.add(new UInteger(index)); // requirement: 3.4.7.2.5
configObjectsObjId = comObject.getArchiveDetails().getDetails().getRelated();
if (latestPerObj.getArchiveDetails().getTimestamp().getValue() < perObj.getArchiveDetails().getTimestamp().getValue()) {
/** * Generates a ArchiveDetailsList structure with one ArchiveDetails object. * The object instance identifier will be set as 0. The operation will use * the submitted related, source and connectionDetails fields to fill-in the * object. It will use the provider's network to fill in the network's * field. * * @param related Related field * @param source Source field * @param uri URI field * @return The ArchiveDetailsList object */ public static ArchiveDetailsList generateArchiveDetailsList(final Long related, final ObjectId source, final URI uri) { final ArchiveDetails archiveDetails = new ArchiveDetails(); archiveDetails.setInstId(new Long(0)); archiveDetails.setDetails(new ObjectDetails(related, source)); archiveDetails.setNetwork(ConfigurationProviderSingleton.getNetwork()); archiveDetails.setTimestamp(HelperTime.getTimestamp()); archiveDetails.setProvider(uri); final ArchiveDetailsList archiveDetailsList = new ArchiveDetailsList(); archiveDetailsList.add(archiveDetails); return archiveDetailsList; }
public ArchivePersistenceObject(final ObjectType objectType, final IdentifierList domain, final Long objId, final ArchiveDetails archiveDetails, final Object object) { this.objectType = objectType; this.domainId = domain; this.objId = objId; this.providerURI = archiveDetails.getProvider().getValue(); this.network = archiveDetails.getNetwork().getValue(); this.timestampArchiveDetails = archiveDetails.getTimestamp().getValue(); this.sourceLink = archiveDetails.getDetails().getSource(); this.relatedLink = archiveDetails.getDetails().getRelated(); // this.obj = (Element) HelperAttributes.javaType2Attribute(object); this.object = object; }