external.java
来自「CmisJavaApi」· Java 代码 · 共 144 行
JAVA
144 行
/* * The contents of this file are subject to the Dyade Public License, * as defined by the file DYADE_PUBLIC_LICENSE.TXT * * You may not use this file except in compliance with the License. You may * obtain a copy of the License on the Dyade web site (www.dyade.fr). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific terms governing rights and limitations under the License. * * The Original Code is CmisJava API, including the java package * fr.dyade.cmis, released September 5, 2000. * * The Initial Developer of the Original Code is Dyade. The Original Code and * portions created by Dyade are Copyright Bull and Copyright INRIA. * All Rights Reserved. *//* Copyright 1996-2000 by Institut National de Recherche en Informatique * et en Automatique (INRIA) * All rights reserved. See COPYRIGHT in top-level directory. * * Authors: Laurent Andrey, Eric Dillon, Olivier Festor */// $Id: External.java,v 1.2 2000/09/05 13:30:39 festor Exp $// $Source: /local/resedas/CVS-Repository/CmisJavaApi/src/fr/dyade/cmis/api/types/External.java,v $// Todo//// LA: may find a solution for this Bytes/Bits/Value messy business due to j2c_bytesMap.// trash away mask shit indeed.package fr.dyade.cmis.api.types;/** ASN1 type for external. * Java representation for ASN1 external [X711, page 20]. * LA: where is something fancy here: we are using derived classes of * Value for External data type... * @version cvs $Id: External.java,v 1.2 2000/09/05 13:30:39 festor Exp $ */public class External extends CMISType { public External() { super(); } // To set Mandatory fields public void setAny(Any pAny) { fT = ISMJava_EXTERNAL_ANY; fAny = pAny; fOctetAligned=null; fArbitrary=null; } public Any getAny() { if (fT == ISMJava_EXTERNAL_ANY) return (Any)fAny; return null; } public void setOctetAligned(OctetString pOctetAligned) { fT = ISMJava_EXTERNAL_OCTET_STRING; fOctetAligned = pOctetAligned; fAny=null; fArbitrary=null; } public OctetString getOctetAligned() { if (fT == ISMJava_EXTERNAL_OCTET_STRING) return (OctetString)fOctetAligned; return null; } public void setArbitrary(BitString pArbitrary) { fT = ISMJava_EXTERNAL_ARBITRARY; fArbitrary = pArbitrary; fAny=null; fOctetAligned=null; } public BitString getArbitrary() { if (fT == ISMJava_EXTERNAL_ARBITRARY) return (BitString)fArbitrary; return null; } // To set optional fields public void setCtxId(long pCtxId) { fMask = ISMJava_MASK_EXTERNAL_CTXTID; fCtxId = pCtxId; } public long getCtxId() { if (fMask == ISMJava_MASK_EXTERNAL_CTXTID) return fCtxId; return 0; } public void setOid(ObjectIdentifier pOid) { fMask = ISMJava_MASK_EXTERNAL_OID; fOid = pOid; } public ObjectIdentifier getOid() { if (fMask == ISMJava_MASK_EXTERNAL_OID) return fOid; return null; } public void setObjDesc(Bytes pObjDesc) { fMask = ISMJava_MASK_EXTERNAL_OBJDESC; fObjDesc = pObjDesc; } public Bytes getObjDesc() { if (fMask == ISMJava_MASK_EXTERNAL_OBJDESC) return fObjDesc; return null; } //LA: ISM stuff here. Should be somewhere else !!!! public static final short ISMJava_EXTERNAL_ANY = 0; public static final short ISMJava_EXTERNAL_OCTET_STRING = 1; public static final short ISMJava_EXTERNAL_ARBITRARY = 2; public static final int ISMJava_MASK_NONE = 0x0000; public static final int ISMJava_MASK_EXTERNAL_CTXTID = 0x0001; public static final int ISMJava_MASK_EXTERNAL_OID = 0x0002; public static final int ISMJava_MASK_EXTERNAL_OBJDESC = 0x0004; private int fMask = ISMJava_MASK_NONE; private short fT; // Optional parameters used according to the fMask field private long fCtxId; private ObjectIdentifier fOid; private Bytes fObjDesc; // Optional parameters used according to the fT field // As Bytes or Bits because fmk c mapping looks Bytes field // in any case of Bytes field => do not keep stuff in derived classes // LA??: example or not clean separation between api and ism java implementation private Bytes fAny; private Bytes fOctetAligned; private Bits fArbitrary; } // External
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?