Drools :: Core 6.1.0.Beta1

org.drools.core.io.impl
Class BaseResource

java.lang.Object
  extended by org.drools.core.io.impl.BaseResource
All Implemented Interfaces:
Externalizable, Serializable, InternalResource, org.kie.api.io.Resource
Direct Known Subclasses:
ByteArrayResource, ClassPathResource, DescrResource, EncodedResource, FileSystemResource, InputStreamResource, ReaderResource, UrlResource

public abstract class BaseResource
extends Object
implements InternalResource, Externalizable

See Also:
Serialized Form

Constructor Summary
BaseResource()
           
 
Method Summary
 void addCategory(String tag)
           
 boolean equals(Object o)
           
 byte[] getBytes()
           
 List<String> getCategories()
           
 org.kie.api.io.ResourceConfiguration getConfiguration()
           
 String getDescription()
          Returns the description of the resource.
 org.kie.api.io.ResourceType getResourceType()
           
 String getSourcePath()
           
 String getTargetPath()
           
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 void setCategories(String categories)
           
 InternalResource setConfiguration(org.kie.api.io.ResourceConfiguration conf)
           
 void setDescription(String description)
           
 InternalResource setResourceType(org.kie.api.io.ResourceType resourceType)
           
 InternalResource setSourcePath(String path)
           
 InternalResource setTargetPath(String path)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.core.io.internal.InternalResource
getLastModified, getLastRead, getURL, hasURL, isDirectory, listResources
 
Methods inherited from interface org.kie.api.io.Resource
getInputStream, getReader
 

Constructor Detail

BaseResource

public BaseResource()
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

getConfiguration

public org.kie.api.io.ResourceConfiguration getConfiguration()
Specified by:
getConfiguration in interface InternalResource
Specified by:
getConfiguration in interface org.kie.api.io.Resource

setConfiguration

public InternalResource setConfiguration(org.kie.api.io.ResourceConfiguration conf)
Specified by:
setConfiguration in interface InternalResource
Specified by:
setConfiguration in interface org.kie.api.io.Resource

setResourceType

public InternalResource setResourceType(org.kie.api.io.ResourceType resourceType)
Specified by:
setResourceType in interface InternalResource
Specified by:
setResourceType in interface org.kie.api.io.Resource

getResourceType

public org.kie.api.io.ResourceType getResourceType()
Specified by:
getResourceType in interface InternalResource
Specified by:
getResourceType in interface org.kie.api.io.Resource

getDescription

public String getDescription()
Description copied from interface: InternalResource
Returns the description of the resource. This is just a text description of the resource used to add more information about it. This is not a mandatory attribute

Specified by:
getDescription in interface InternalResource
Returns:
the name of the resource, or null if is not set.

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface InternalResource

getSourcePath

public String getSourcePath()
Specified by:
getSourcePath in interface org.kie.api.io.Resource

getTargetPath

public String getTargetPath()
Specified by:
getTargetPath in interface org.kie.api.io.Resource

setSourcePath

public InternalResource setSourcePath(String path)
Specified by:
setSourcePath in interface org.kie.api.io.Resource

setTargetPath

public InternalResource setTargetPath(String path)
Specified by:
setTargetPath in interface org.kie.api.io.Resource

getCategories

public List<String> getCategories()
Specified by:
getCategories in interface InternalResource

setCategories

public void setCategories(String categories)
Specified by:
setCategories in interface InternalResource

addCategory

public void addCategory(String tag)
Specified by:
addCategory in interface InternalResource

getBytes

public byte[] getBytes()
Specified by:
getBytes in interface InternalResource

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Drools :: Core 6.1.0.Beta1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.