|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.catalog.CatalogItemGroup<Resource,ResourceGroup,ResourceCatalog> edu.nrao.sss.model.resource.ResourceGroup
public class ResourceGroup
A collection of Resource
s.
A ResourceGroup
is normally contained in a
ResourceCatalog
and is a way of categorizing
resources that have similar traits.
Version Info:
$Revision: 1709 $ |
$Date: 2008-11-14 11:22:37 -0700 (Fri, 14 Nov 2008) $ |
$Author: dharland $ (last person to modify) |
Field Summary |
---|
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Constructor Summary | |
---|---|
ResourceGroup()
Creates a new group that has a default name and that belongs to no catalog. |
|
ResourceGroup(ResourceCatalog container,
String nameOfGroup)
Creates a new group that belongs to container . |
Method Summary | |
---|---|
static ResourceGroup |
fromXml(Reader reader)
Creates a new group based on the XML data read from reader . |
static ResourceGroup |
fromXml(String xmlFile)
Creates a new group from the XML data in the given file. |
protected long |
getIdOfUnidentified()
Returns Identifiable.UNIDENTIFIED . |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.nrao.sss.util.Identifiable |
---|
getId |
Constructor Detail |
---|
public ResourceGroup()
public ResourceGroup(ResourceCatalog container, String nameOfGroup)
container
.
container
- the name of the one catalog to which this group belongs.
This value may be null.nameOfGroup
- the name of this group. If this value is null,
a non-null default name will be used.Method Detail |
---|
protected long getIdOfUnidentified()
Identifiable.UNIDENTIFIED
.
getIdOfUnidentified
in class CatalogItemGroup<Resource,ResourceGroup,ResourceCatalog>
public static ResourceGroup fromXml(String xmlFile) throws JAXBException, XMLStreamException, FileNotFoundException
xmlFile
- the name of an XML file. This method will attempt to locate
the file by using Class.getResource(String)
.
FileNotFoundException
- if the XML file cannot be found.
JAXBException
- if the schema file used (if any) is malformed, if
the XML file cannot be read, or if the XML file is not
schema-valid.
XMLStreamException
- if there is a problem opening the XML file,
if the XML is not well-formed, or for some other
"unexpected processing conditions".public static ResourceGroup fromXml(Reader reader) throws JAXBException, XMLStreamException
reader
.
reader
- the source of the XML data.
If this value is null, null is returned.
reader
.
XMLStreamException
- if the XML is not well-formed,
or for some other "unexpected processing conditions".
JAXBException
- if anything else goes wrong during the
transformation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |