Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 
 
 /*
  * Created on : 04.2003
  * Created by : s3595
  */
 package at.spardat.xma.boot.comp.data;
 
 
 

Author(s):
s3595 Chris Sch�fer (CGS)
Version:
$Id: XMAResource.java 2084 2007-11-27 14:53:31Z s3460 $
 
 
 public class XMAResource {

    
Specifies the location of the resource
 
     private String href_;

    
Describes the version = hashValue of the .jar file
 
     private Version version_;

    
resource type
 
     private TypeID  type_;

    
locale of the resource
 
     private Locale  locale_;

    
reference to a file cache resource object
 
     private IFileCacheResource res_;

    
is the resource shared between applications
 
     private boolean shared_;
 
     public XMAResourceString hrefVersion versionXMAResource.TypeID typeLocale localeboolean shared ) {
         this.    = href;
         this. = version;
         this.  = locale;
         this.    = type;
         this.  = shared;
     }

    
write this object to a xml print stream.

Parameters:
ps the PrintStream to write to
 
     public void writeXMLPrintStream ps ) {
 
        ps.print. + . );
          ps.print. + . + . + this. + . );
          ps.print. + . + . + this..getStringID() + . );
        if != null ) {
          ps.print. + . + . + this..toString() + . );
        }
        if() {
            ps.print(. + . + . + this. + .);
        }
        ps.print. + . );
     }
 
     public static class TypeID {
       private String strID;
 
       public static String TYPE_JAR          = "jar"//$NON-NLS-1$
       public static String TYPE_NATIVELIB    = "lib"//$NON-NLS-1$
       // public String TYPE_FILE         = "file";
 
       public TypeIDString id ) {
            = id;
       }
       public String getStringID() {
           return ;
       }
 
       public static TypeID getIDString id ) throws SAXException{
         if ( id.equals(. ) ) {
             return new TypeID(.);
         } else ifid.equals(.)) {
             return new TypeID(.);
         } else
          throw new SAXException"parse error"); //$NON-NLS-1$
      }
    }

    

Returns:
String href
    public String getHref_() {
        return ;
    }

    

Returns:
Locale locale
    public Locale getLocale_() {
        return ;
    }

    

Returns:
TypeID typeid
    public TypeID getType_() {
        return ;
    }

    

Returns:
Version
    public Version getVersion_() {
        return ;
    }

    

Returns:
Returns if shared.
    public boolean isShared_() {
        return ;
    }

    

Parameters:
string href to set
    public void setHref_(String string) {
         = string;
    }

    

Parameters:
locale locale to set
    public void setLocale_(Locale locale) {
         = locale;
    }

    

Parameters:
typeID
    public void setType_(TypeID typeID) {
         = typeID;
    }

    

Parameters:
version
    public void setVersion_(Version version) {
         = version;
    }

    

Returns:
IFileCacheResource
    public IFileCacheResource getRes_() {
        return ;
    }

    

Parameters:
resource
    public void setRes_(IFileCacheResource resource) {
         = resource;
    }

    

Parameters:
shared The shared to set.
    public void setShared_(boolean shared) {
         = shared;
    }

     

Returns:
true if this resource describes a jar-file
Author(s):
s2877
Since:
1.3.0
    public boolean isJar() {
        return ..equals(.);
    }

    

Returns:
true if this resource describes a dll-file
Author(s):
s2877
Since:
1.3.0
    public boolean isNativeLib() {
        return ..equals(.);
    }
New to GrepCode? Check out our FAQ X