/*
(non-Javadoc)

@see com.emc.ecs.nfsclient.nfs.NfsResponseBase#unmarshalling(com.emc.ecs.
nfsclient.rpc.Xdr)
8352
public void unmarshalling(Xdr xdr) throws RpcException {
        super.unmarshalling(xdr);
        if (stateIsOk()) {
            unmarshallingFileHandle(xdr);
            unmarshallingAttributes(xdr);
        }
        _directoryWccData = new NfsWccData(xdr);
    }
1217000
public void unmarshalling(Xdr xdr) {
        _loaded = true;
        _type = NfsType.fromValue((int) xdr.getUnsignedInt());
        _mode = xdr.getUnsignedInt();
        _nlink = xdr.getUnsignedInt();
        _uid = xdr.getUnsignedInt();
        _gid = xdr.getUnsignedInt();
        _size = xdr.getLong();
        _used = xdr.getLong();
        _rdev[0] = xdr.getUnsignedInt();
        _rdev[1] = xdr.getUnsignedInt();
        _fsid = xdr.getLong();
        _fileid = xdr.getLong();
        _atime = new NfsTime();
        _mtime = new NfsTime();
        _ctime = new NfsTime();
        _atime.unmarshalling(xdr);
        _mtime.unmarshalling(xdr);
        _ctime.unmarshalling(xdr);
    }
1092961
public List<T> unmarshall(JsonUnmarshallerContext context) throws Exception {
        if (context.isInsideResponseHeader()) {
            return unmarshallResponseHeaderToList(context);
        }
        return unmarshallJsonToList(context);
    }
149768
public void marshalling(Xdr xdr) {
        super.marshalling(xdr);
        xdr.putString(_name);
        xdr.putInt(_createMode.getValue());
        if (_createMode != NfsCreateMode.EXCLUSIVE) {
            _attributes.marshalling(xdr);
        } else {
            xdr.putByteArray(_verifier);
        }
    }
613813
@SuppressWarnings("unchecked")
  private <T> T unmarshal() {

    try {
      instantiateEntity();
      unmarshalIdentifier();
      unmarshalKeyAndParentKey();
      unmarshalProperties();
      unmarshalEmbeddedFields();
      // If using Builder pattern, invoke build method on the Builder to
      // get the final entity.
      ConstructorMetadata constructorMetadata = entityMetadata.getConstructorMetadata();
      if (constructorMetadata.isBuilderConstructionStrategy()) {
        entity = constructorMetadata.getBuildMethodHandle().invoke(entity);
      }
      return (T) entity;
    } catch (EntityManagerException exp) {
      throw exp;
    } catch (Throwable t) {
      throw new EntityManagerException(t.getMessage(), t);
    }
  }
1318257
public void unmarshalling(Xdr xdr) throws RpcException {
        super.unmarshalling(xdr);
        unmarshallingAttributes(xdr);
        if (stateIsOk()) {
            _data = xdr.getString();
        }
    }
946595
public void marshalling(Xdr xdr) {
        super.marshalling(xdr);
        xdr.putString(_name);
        _attributes.marshalling(xdr);
    }
632939
public Object unmarshalMessage(String xml)
    {
        try {
            IBindingFactory jc = BindingDirectory.getFactory(Model.class);
            IUnmarshallingContext unmarshaller = jc.createUnmarshallingContext();
            Reader inStream = new StringReader(xml);
            Object message = unmarshaller.unmarshalDocument( inStream, BINDING_NAME);
            return message;
        } catch (JiBXException e) {
            e.printStackTrace();
        }
        return null;
    }
948928
@Override
    public Object unmarshall(Type feelType, String value) {
        return feel.evaluate( value );
    }
55379
public Object unmarshal(HierarchicalStreamReader reader,
			UnmarshallingContext context) {
		XFactory factory = XFactoryRegistry.instance().currentDefault();
		XTrace trace = factory.createTrace();
		reader.moveDown();
		XAttributeMap attributes = (XAttributeMap) context.convertAnother(
				trace, XAttributeMap.class,
				XesXStreamPersistency.attributeMapConverter);
		trace.setAttributes(attributes);
		reader.moveUp();
		while (reader.hasMoreChildren()) {
			reader.moveDown();
			XEvent event = (XEvent) context.convertAnother(trace, XEvent.class,
					XesXStreamPersistency.eventConverter);
			trace.add(event);
			reader.moveUp();
		}
		return trace;
	}
549739
protected static NfsGetAttributes makeNfsGetAttributes(Xdr xdr, boolean force) {
        NfsGetAttributes attributes = null;
        if (force || xdr.getBoolean()) {
            attributes = new NfsGetAttributes();
            attributes.unmarshalling(xdr);
        }
        return attributes;
    }
903865
private void unmarshalEmbeddedFields() throws Throwable {
    for (EmbeddedMetadata embeddedMetadata : entityMetadata.getEmbeddedMetadataCollection()) {
      if (embeddedMetadata.getStorageStrategy() == StorageStrategy.EXPLODED) {
        unmarshalWithExplodedStrategy(embeddedMetadata, entity);
      } else {
        unmarshalWithImplodedStrategy(embeddedMetadata, entity, nativeEntity);
      }
    }
  }
1130238
public void unmarshalling(Xdr xdr) {
        _loaded = true;
        linkMaximum = xdr.getUnsignedInt();
        nameMaximum = xdr.getUnsignedInt();
        noTruncation = xdr.getBoolean();
        chownRestricted = xdr.getBoolean();
        caseInsensitive = xdr.getBoolean();
        casePreserving = xdr.getBoolean();
    }
1349178
@Override
    public Entry<String, NotificationConfiguration> unmarshall(StaxUnmarshallerContext context) throws Exception {
        int originalDepth = context.getCurrentDepth();
        int targetDepth = originalDepth + 1;

        if (context.isStartOfDocument()) {
            targetDepth += 1;
        }

        T topicConfig = createConfiguration();
        String id = null;

        while (true) {
            XMLEvent xmlEvent = context.nextEvent();
            if (xmlEvent.isEndDocument()) {
                return new SimpleEntry<String, NotificationConfiguration>(id, topicConfig);
            }

            if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
                if (handleXmlEvent(topicConfig, context, targetDepth)) {
                    // Do nothing, subclass has handled it
                } else if (context.testExpression("Id", targetDepth)) {
                    id = StringStaxUnmarshaller.getInstance().unmarshall(context);
                } else if (context.testExpression("Event", targetDepth)) {
                    topicConfig.addEvent(StringStaxUnmarshaller.getInstance().unmarshall(context));
                } else if (context.testExpression("Filter", targetDepth)) {
                    topicConfig.setFilter(FilterStaxUnmarshaller.getInstance().unmarshall(context));
                }
            } else if (xmlEvent.isEndElement()) {
                if (context.getCurrentDepth() < originalDepth) {
                    return new SimpleEntry<String, NotificationConfiguration>(id, topicConfig);
                }
            }
        }
    }
359387
private void unmarshalProperty(PropertyMetadata propertyMetadata, Object target)
      throws Throwable {
    unmarshalProperty(propertyMetadata, target, nativeEntity);
  }
668460
public void unmarshalling(Xdr xdr) throws RpcException {
        xdr.setOffset(0);
        _xid = xdr.getInt();
        _direction = xdr.getInt();
        _replyStatus = xdr.getInt();
        if (_replyStatus == ReplyStatus.MSG_ACCEPTED.getValue()) {
            xdr.skip(4);            // verifier flavor
            // byte[] verifier = x.xdr_bytes();
            xdr.getByteArray();
            _acceptStatus = xdr.getInt();
        } else {
            _rejectStatus = xdr.getInt();
        }

        checkRpcReply();
    }
1126679
public void unmarshalling(Xdr xdr) throws RpcException {
        super.unmarshalling(xdr);
        unmarshallingAttributes(xdr);
        if (stateIsOk()) {
            _cookieverf = xdr.getLong();

            // get directory entries
            while (xdr.getBoolean()) {
                NfsDirectoryEntry entry = new NfsDirectoryEntry(xdr);
                _entries.add(entry);
                _cookie = entry.getCookie();
            }

            // check whether it is the end of directory
            _eof = xdr.getBoolean();
        }
    }