rs.sol.soloist.server.builtindomains.builtindatatypes
Class File

java.lang.Object
  extended by rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
      extended by rs.sol.soloist.server.uml.commonimplementation.runtime._DataTypeInstance
          extended by rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance
              extended by rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfDataType
                  extended by rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfPrimitiveType
                      extended by rs.sol.soloist.server.builtindomains.builtindatatypes.File
All Implemented Interfaces:
rs.sol.soloist.server.uml.concepts.IElement, IClassifierInstance, IDataTypeInstance, IPrimitiveTypeInstance, IRTElement
Direct Known Subclasses:
Picture

public class File
extends InstanceOfPrimitiveType


Nested Class Summary
static class File.AsBlob
          File stored as BLOB
static class File.PathAsString
          File path (absolute) encoded as string
static class File.RelativePathAsString
          File path (relative to repository) encoded as string
 
Field Summary
static IPrimitiveType CLASSIFIER
           
static java.lang.String FQ_TYPE_NAME
           
 
Constructor Summary
File()
          Creates a new File in the file repository.
File(java.io.File parent, java.lang.String file)
           
File(java.lang.String path)
           
File(java.lang.String pathOrExtension, boolean extension)
           
File(java.lang.String parent, java.lang.String file)
           
 
Method Summary
static java.io.File createFileInRepository(java.lang.String filename, java.lang.String extension)
           
 boolean equals(java.lang.Object obj)
           
static java.io.File filePathRelativeToBase(java.io.File path, java.io.File base)
           
static File fromContent(byte[] bytes)
           
static File fromContent(java.io.InputStream contentStream)
           
static File fromContent(java.io.InputStream contentStream, java.lang.String extension)
           
static File fromContent(java.lang.String string)
           
static File fromContent(Text text)
           
static File fromSerializable(java.io.Serializable ser)
           
static File fromString(java.lang.String path)
          Deprecated. This should only be used by obsolete outdated O2R mapping mechanisms
 byte[] getDigest()
           
 long getFileSize()
           
 java.io.InputStream getInputStream()
           
 java.lang.String getSQLString()
           
 java.lang.Object getValue()
           
 int hashCode()
           
 boolean isEqualTo(IClassifierInstance ci)
          Is this Classifier Instance equal to the given Classifier Instance?
Semantic rules:
1.
 IClassifierInstance makeClone()
          Clones this Classifier Instance.
static java.lang.String stringPathRelativeToBase(java.io.File path, java.io.File base)
           
 java.io.File toFile()
           
 java.lang.String toString()
           
 void write(File file)
           
 void write(java.lang.String text)
           
 
Methods inherited from class rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfPrimitiveType
accept, accept, toSerializable
 
Methods inherited from class rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance
addAttributeValue, getAttributeValue, getDataType, getMyID, getSlot, getSlots, setDataType, setMyID
 
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._DataTypeInstance
getClassifier, hasIdentity, isClassInstance, isDataTypeInstance, isMarkedAsDeleted, markAsDeleted
 
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
conformsTo, constructor, copySlots, copySlots, destroy, destructor, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValues, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getMElement, getSlot, getSlot, getSlot, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf, isKindOf, isModelElement, isRTElement
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IDataTypeInstance
getDataType
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IClassifierInstance
conformsTo, constructor, copySlots, copySlots, destroy, destructor, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValues, getClassifier, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getMyID, getSlot, getSlot, getSlot, getSlot, getSlots, isClassInstance, isDataTypeInstance, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf, isMarkedAsDeleted, markAsDeleted
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IRTElement
getMElement, hasIdentity
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.IElement
isKindOf, isModelElement, isRTElement
 

Field Detail

FQ_TYPE_NAME

public static final java.lang.String FQ_TYPE_NAME
See Also:
Constant Field Values

CLASSIFIER

public static final IPrimitiveType CLASSIFIER
Constructor Detail

File

public File()
Creates a new File in the file repository.


File

public File(java.lang.String pathOrExtension,
            boolean extension)
     throws java.io.IOException
Throws:
java.io.IOException

File

public File(java.lang.String path)

File

public File(java.lang.String parent,
            java.lang.String file)

File

public File(java.io.File parent,
            java.lang.String file)
Method Detail

fromString

@Deprecated
public static File fromString(java.lang.String path)
                       throws java.io.IOException
Deprecated. This should only be used by obsolete outdated O2R mapping mechanisms

Throws:
java.io.IOException

fromContent

public static File fromContent(java.io.InputStream contentStream)
                        throws java.io.IOException
Throws:
java.io.IOException

fromContent

public static File fromContent(java.io.InputStream contentStream,
                               java.lang.String extension)
                        throws java.io.IOException
Throws:
java.io.IOException

fromContent

public static File fromContent(byte[] bytes)
                        throws java.io.IOException
Throws:
java.io.IOException

fromContent

public static File fromContent(java.lang.String string)
                        throws java.io.IOException
Throws:
java.io.IOException

fromContent

public static File fromContent(Text text)
                        throws java.io.IOException
Throws:
java.io.IOException

makeClone

public IClassifierInstance makeClone()
                              throws rs.sol.soloist.server.uml.exceptions.ActionExecutionFailedException
Description copied from interface: IClassifierInstance
Clones this Classifier Instance.

Throws:
rs.sol.soloist.server.uml.exceptions.ActionExecutionFailedException

toString

public java.lang.String toString()
Specified by:
toString in interface IDataTypeInstance
Overrides:
toString in class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance

getSQLString

public java.lang.String getSQLString()
Specified by:
getSQLString in interface IDataTypeInstance
Overrides:
getSQLString in class InstanceOfPrimitiveType

write

public void write(java.lang.String text)
           throws java.io.FileNotFoundException,
                  java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

write

public void write(File file)
           throws java.io.FileNotFoundException,
                  java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Throws:
java.io.IOException

toFile

public java.io.File toFile()

getDigest

public byte[] getDigest()

isEqualTo

public boolean isEqualTo(IClassifierInstance ci)
                  throws rs.sol.soloist.server.uml.exceptions.RequestFailedException
Description copied from interface: IClassifierInstance
Is this Classifier Instance equal to the given Classifier Instance?
Semantic rules:
1. If this and ci are instances of different kinds of Classifiers (one is an instance of a Class, and the other is an instance of a Data Type) they are different (not equal).
2. If this and ci refer to two different instances of Classes, they are different (not equal).
3. If this and ci refer to two instances of Data Types, their equality is checked on value basis (if all of their Slots are equal).

Specified by:
isEqualTo in interface IClassifierInstance
Overrides:
isEqualTo in class rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance
Throws:
rs.sol.soloist.server.uml.exceptions.RequestFailedException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface IPrimitiveTypeInstance
Overrides:
getValue in class InstanceOfPrimitiveType

fromSerializable

public static File fromSerializable(java.io.Serializable ser)

getFileSize

public long getFileSize()

createFileInRepository

public static java.io.File createFileInRepository(java.lang.String filename,
                                                  java.lang.String extension)
                                           throws java.io.IOException
Throws:
java.io.IOException

filePathRelativeToBase

public static java.io.File filePathRelativeToBase(java.io.File path,
                                                  java.io.File base)

stringPathRelativeToBase

public static java.lang.String stringPathRelativeToBase(java.io.File path,
                                                        java.io.File base)