Package org.drools.core.io.impl
Class BaseResource
- java.lang.Object
-
- org.drools.core.io.impl.BaseResource
-
- All Implemented Interfaces:
Externalizable
,Serializable
,InternalResource
,org.kie.api.io.Resource
- Direct Known Subclasses:
ByteArrayResource
,ClassPathResource
,DescrResource
,FileSystemResource
,InputStreamResource
,ReaderResource
,UrlResource
public abstract class BaseResource extends Object implements InternalResource, Externalizable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
bytes
-
Constructor Summary
Constructors Constructor Description BaseResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
getEncoding, getURL, hasURL, isDirectory, listResources
-
-
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
getConfiguration
public org.kie.api.io.ResourceConfiguration getConfiguration()
- Specified by:
getConfiguration
in interfaceInternalResource
- Specified by:
getConfiguration
in interfaceorg.kie.api.io.Resource
-
setConfiguration
public InternalResource setConfiguration(org.kie.api.io.ResourceConfiguration conf)
- Specified by:
setConfiguration
in interfaceInternalResource
- Specified by:
setConfiguration
in interfaceorg.kie.api.io.Resource
-
setResourceType
public InternalResource setResourceType(org.kie.api.io.ResourceType resourceType)
- Specified by:
setResourceType
in interfaceInternalResource
- Specified by:
setResourceType
in interfaceorg.kie.api.io.Resource
-
getResourceType
public org.kie.api.io.ResourceType getResourceType()
- Specified by:
getResourceType
in interfaceInternalResource
- Specified by:
getResourceType
in interfaceorg.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 interfaceInternalResource
- Returns:
- the name of the resource, or null if is not set.
-
setDescription
public void setDescription(String description)
- Specified by:
setDescription
in interfaceInternalResource
-
getSourcePath
public String getSourcePath()
- Specified by:
getSourcePath
in interfaceorg.kie.api.io.Resource
-
getTargetPath
public String getTargetPath()
- Specified by:
getTargetPath
in interfaceorg.kie.api.io.Resource
-
setSourcePath
public InternalResource setSourcePath(String path)
- Specified by:
setSourcePath
in interfaceorg.kie.api.io.Resource
-
setTargetPath
public InternalResource setTargetPath(String path)
- Specified by:
setTargetPath
in interfaceorg.kie.api.io.Resource
-
getCategories
public List<String> getCategories()
- Specified by:
getCategories
in interfaceInternalResource
-
setCategories
public void setCategories(String categories)
- Specified by:
setCategories
in interfaceInternalResource
-
addCategory
public void addCategory(String tag)
- Specified by:
addCategory
in interfaceInternalResource
-
getBytes
public byte[] getBytes()
- Specified by:
getBytes
in interfaceInternalResource
-
-