congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ElementList
Code IndexAdd Tabnine to your IDE (free)

How to use
ElementList
in
org.ccsds.moims.mo.mal.structures

Best Java code snippets using org.ccsds.moims.mo.mal.structures.ElementList (Showing top 17 results out of 315)

origin: int.esa.nmf.core.moservices.impl/ccsds-com

public ElementList getObjects() {
  ElementList bodies;
  try {
    bodies = HelperMisc.element2elementList(object);
    bodies.add(object);
  } catch (Exception ex) {
    bodies = null;
  }
  return bodies;
}
origin: int.esa.nmf.core.moservices.impl/ccsds-com

/**
 * Changes the current set of definitions available by the provided set.
 *
 * @param objIds Object instance identifiers
 * @param definitions The object body of the definitions
 * @return True if the configuration was successfully changed. False
 * otherwise.
 */
public synchronized Boolean reconfigureDefinitions(LongList objIds, ElementList definitions) {
  if (objIds == null || definitions == null) {
    return false;
  }
  if (objIds.size() != definitions.size()) {
    return false;
  }
  defs.clear();
  for (int i = 0; i < objIds.size(); i++) {
    defs.put(objIds.get(i), (Element) definitions.get(i));
  }
  return true;
}
origin: int.esa.nmf.core.moservices.impl/ccsds-com

/**
 * Get all the definition objects available.
 *
 * @return The Definitions.
 */
public synchronized ElementList getAllDefs() {
  ElementList list = this.newDefinitionList();
  list.addAll(defs.values());
  return list;
}
origin: int.esa.nmf.core.moservices.impl/ccsds-com

if (eventBodies.isEmpty()) {
  Logger.getLogger(EventProviderServiceImpl.class.getName()).log(Level.WARNING, "The event bodies list is empty!");
  eventBodies.add(new UInteger());
origin: int.esa.nmf.core.moservices.impl/ccsds-com

/**
 * Get the object body of a retrieved COM object from the Archive
 *
 * @param archiveService The Archive
 * @param objType The object Type of the COM object
 * @param domain The domain of the COM object
 * @param objId The object instance identifier of the COM object
 * @return The object body of the retrieved COM object
 */
public static Element getObjectBodyFromArchive(final Object archiveService,
    final ObjectType objType, final IdentifierList domain, final Long objId) {
  final LongList objIds = new LongList();
  objIds.add(objId);
  final ElementList objs = (ElementList) getFromArchive(
      archiveService,
      objType,
      domain,
      objIds,
      ToBeReturned.OBJECT_BODY
  );
  return (objs != null) ? (Element) objs.get(0) : null;
  /*
  if (objs != null) {
    return (Element) objs.get(0);
  } else {
    return null;
  }
   */
}
origin: int.esa.nmf.core.moservices.impl/ccsds-com

if (objects.isEmpty()) {
  return; // No objects... 
ObjectId obj = (ObjectId) objects.get(0);
origin: int.esa.nmf.core.moservices.impl/ccsds-com

if (lArchiveDetailsList.size() != lElementList.size()) { // requirement: ------ (proposed, does not exist yet)
  UIntegerList error = new UIntegerList();
  int size1 = (lArchiveDetailsList.size() < lElementList.size()) ? lArchiveDetailsList.size() : lElementList.size();
  int size2 = (lArchiveDetailsList.size() > lElementList.size()) ? lArchiveDetailsList.size() : lElementList.size();
origin: int.esa.nmf.core/helper-tools

/**
 * Generates the corresponding MAL Element from a certain MAL Element List
 *
 * @param obj The MAL Element List
 * @return The MAL Element
 * @throws java.lang.Exception
 */
public static Element elementList2element(ElementList obj) throws Exception {
  if (obj == null) {
    return null;
  }
  long l = obj.getShortForm();
  long ll = (-((l) & 0xFFFFFFL)) & 0xFFFFFFL + (l & 0xFFFFFFFFFF000000L);
  MALElementFactory eleFact = MALContextFactory.getElementFactoryRegistry().lookupElementFactory(ll);
  if (eleFact == null) {
    Logger.getLogger(HelperMisc.class.getName()).log(Level.SEVERE,
        "The element could not be found in the MAL ElementFactory! The object type is: '"
        + obj.getClass().getSimpleName()
        + "'. Maybe the service Helper for this object was not initialized. "
        + "Try initializing the Service Helper of this object.");
  }
  return (Element) eleFact.createElement();
}
origin: int.esa.nmf.core.moservices.impl/ccsds-com

if (eventBodies.isEmpty()) {
  Logger.getLogger(EventProviderServiceImpl.class.getName()).log(Level.WARNING,
      "The event bodies list is empty!");
  eventBodies.add(new UInteger());
origin: int.esa.nmf.core.moservices.impl/ccsds-com

final Object objBody = (objects == null) ? null : ((objects.get(i) == null) ? null : objects.get(i));
origin: int.esa.nmf.core.moservices.impl/ccsds-com

if (lArchiveDetailsList.size() != lElementList.size()) { // requirement: 3.4.6.2.8
  UIntegerList error = new UIntegerList();
  int size1 = (lArchiveDetailsList.size() < lElementList.size()) ? lArchiveDetailsList.size() : lElementList.size();
  int size2 = (lArchiveDetailsList.size() > lElementList.size()) ? lArchiveDetailsList.size() : lElementList.size();
origin: int.esa.nmf.core.moservices.impl/ccsds-mc

/**
 * Changes the current set of definitions available by the provided set.
 *
 * @param identityIds the identityIds of the parameters to be set
 * @param names the names of the parameters to be set
 * @param defIds the definitionsIds of the parameters to be set
 * @param definitions The object body of the definitions to be set
 * @return True if the configuration was successfully changed. False
 * otherwise.
 */
public synchronized Boolean reconfigureDefinitions(final LongList identityIds,
    final IdentifierList names, final LongList defIds, final ElementList definitions) {
  if (identityIds == null || names == null || defIds == null || definitions == null) {
    return false;
  }
  if (identityIds.size() != names.size() && defIds.size() != definitions.size() && identityIds.size() != defIds.size()) {
    return false;
  }
  this.identitiesToNamesMap.clear();
  this.namesToPairsMap.clear();
  this.objIdToDefMap.clear();
  for (int i = 0; i < identityIds.size(); i++) {
    this.identitiesToNamesMap.put(identityIds.get(i), names.get(i));
    this.namesToPairsMap.put(names.get(i), new ObjectInstancePair(identityIds.get(i), defIds.get(i)));
    this.objIdToDefMap.put(defIds.get(i), (Element) definitions.get(i));
  }
  return true;
}
origin: int.esa.nmf.core.moservices.impl/ccsds-com

events.add(eventObjBody);
origin: int.esa.nmf.core.moservices.impl/ccsds-com

protected void updateEntries(final ObjectType objType, final IdentifierList domain,
    final ArchiveDetailsList lArchiveDetails, final ElementList objects, final MALInteraction interaction) {
  final int domainId = this.fastDomain.getDomainId(domain);
  final Integer objTypeId = this.fastObjectType.getObjectTypeId(objType);
  final ArrayList<COMObjectEntity> newObjs = new ArrayList<COMObjectEntity>();
  final LongList objIds = new LongList();
  // Generate the object Ids if needed and the persistence objects to be stored
  for (int i = 0; i < lArchiveDetails.size(); i++) {
    final Integer providerURIId = this.fastProviderURI.getProviderURIId(lArchiveDetails.get(i).getProvider());
    final Integer networkId = this.fastNetwork.getNetworkId(lArchiveDetails.get(i).getNetwork());
    // If there are no objects in the list, inject null...
    Object objBody = (objects == null) ? null : ((objects.get(i) == null) ? null : objects.get(i));
    SourceLinkContainer sourceLink = this.createSourceContainerFromObjectId(lArchiveDetails.get(i).getDetails().getSource());
    final COMObjectEntity newObj = new COMObjectEntity(
        objTypeId,
        domainId,
        lArchiveDetails.get(i).getInstId(),
        lArchiveDetails.get(i).getTimestamp().getValue(),
        providerURIId,
        networkId,
        sourceLink,
        lArchiveDetails.get(i).getDetails().getRelated(),
        objBody); // 0.170 ms
    newObjs.add(newObj);
    objIds.add(lArchiveDetails.get(i).getInstId());
  }
  Runnable publishEvents = this.generatePublishEventsThread(ArchiveHelper.OBJECTUPDATED_OBJECT_TYPE,
      objType, domain, objIds, interaction);
  this.dbProcessor.update(newObjs, publishEvents);
}
origin: int.esa.ccsds.mo/TRANSPORT_GEN

/**
 * Decodes a single part of the message body.
 *
 * @param meel The encoded element list.
 * @return The decoded chunk.
 * @throws MALException if any error detected.
 */
protected Object decodeEncodedElementListBodyPart(final MALEncodedElementList meel) throws MALException
{
 long sf = (Long) meel.getShortForm();
 final MALElementFactory ef = MALContextFactory.getElementFactoryRegistry().lookupElementFactory(sf);
 if (null == ef)
 {
  throw new MALException("GEN transport unable to find element factory for short type: " + sf);
 }
 // create list of correct type
 long lsf = (-((sf) & 0xFFFFFFL)) & 0xFFFFFFL + (sf & 0xFFFFFFFFFF000000L);
 ElementList rv = (ElementList) MALContextFactory.getElementFactoryRegistry().lookupElementFactory(lsf).createElement();
 for (MALEncodedElement ele : meel)
 {
  final ByteArrayInputStream lbais = new ByteArrayInputStream(ele.getEncodedElement().getValue());
  MALElementInputStream lenc = encFactory.createInputStream(lbais);
  rv.add(lenc.readElement(ef.createElement(), ctx));
 }
 return rv;
}
origin: int.esa.nmf.core.moservices.impl/ccsds-com

  outObjectList.add(perObjs.get(j).getObject()); // requirement: 3.4.4.2.24
outObjectList.add(perObjs.get(j).getObject());
origin: int.esa.nmf.core.moservices.impl/ccsds-com

  outMatchedObjects.add(null);
      outMatchedObjects.add(null);
outMatchedObjects.add(perObj.getObject()); // requirement: 3.4.3.2.10 and 3.4.3.2.11
org.ccsds.moims.mo.mal.structuresElementList

Most used methods

  • add
  • get
  • size
  • addAll
  • getShortForm
  • isEmpty

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Reference (javax.naming)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now