public class Record
extends java.lang.Object
Attribute
used for storing and saving metadataConstructor and Description |
---|
Record() |
Modifier and Type | Method and Description |
---|---|
void |
addAttr(Attribute newAttr)
Adds an attribute to the current record
|
void |
addRecord(Record newRec)
Add all the Attributes of the parameter that DON'T exist in the current Record
|
boolean |
assign(Record rec)
Assígn the values Attributes of a Record to the existing identical Attributes of current Record
|
void |
CheckDef()
Checks the set of Attributes of a Record BUT with some exceptions
ssimilar to
Verify() |
void |
Clear()
Removes ALL the Attributes of the Record
|
boolean |
ContainsAttr(java.lang.String NameAttr)
Checks if an Attribute with the specified name exist in the current Record
|
Record |
Copy()
Creates a identical copy of he record with the same Attributes and values
|
Record |
CopyMono()
Returns a Copy of NON Multivalued Attributes
|
Record |
CopyMulti()
Returns a Copy of Multivalued Attributes
|
void |
delAttr(Attribute DelAttr)
Removes an Attribute from the current Record
|
void |
delAttr(java.lang.String NameDelAttr)
Removes an Attribute from the current Record
|
void |
DelNull()
Removes ALL the atrributes without value
|
void |
delRecord(Record substRec)
Removes from the current Record all the (existing) Attributes included in the parameter
|
boolean |
equals(Record rec)
Compares a Record with the current record
|
Attribute |
getAttr(int NumAttr)
Return the Attribute with the position specified in the record
|
Attribute |
getAttr(java.lang.String NameAttr)
Returns the Attribute of the Record with the specified name
|
void |
initList()
Starts the counter so a program can travel by the set of Attributes with
nextAttr() |
Attribute |
nextAttr()
After initialization with
initList() , allows to travel by the set of Attributes of the Record |
int |
NumAttr()
Returns the current number of Attributes of the Record
|
int |
NumAttrFilled()
Returns the number of Attributes with value
|
java.lang.String |
toString()
Returns an String showing all the Attributes of the Record
|
java.lang.String |
toXML()
Converts all the attributes of the record to XML in a short format
|
java.lang.String |
toXMLt()
Converts all the attributes of the record to XML with ALL tags and elements
|
java.lang.String |
toXMLtNotNull()
Converts all the NON null attributes of the record to XML with ALL tags and elements
|
void |
Verify()
Checks if the Values in the Record follow the restrictions defined for each Attribute (mainly length or required)
|
public void Clear()
public boolean equals(Record rec)
rec
- Record to comparepublic boolean assign(Record rec) throws PDException
rec
- Record containing values to assignPDException
- In any errorpublic void addAttr(Attribute newAttr) throws PDException
newAttr
- Attribute to addPDException
- In any Error (or duplicated Atribute name)public void delAttr(Attribute DelAttr)
DelAttr
- Attribute to removepublic void delAttr(java.lang.String NameDelAttr)
NameDelAttr
- name of the Attribute to removepublic boolean ContainsAttr(java.lang.String NameAttr)
NameAttr
- name of the Attribute to checkpublic Attribute getAttr(java.lang.String NameAttr)
NameAttr
- Name of the Attribute to look forpublic Attribute getAttr(int NumAttr) throws PDException
NumAttr
- Number of AttributePDException
- If the position specified is less that 0 or bigger than the number of Attributespublic int NumAttr()
public int NumAttrFilled()
public void initList()
nextAttr()
public Attribute nextAttr()
initList()
, allows to travel by the set of Attributes of the Recordpublic Record Copy() throws PDException
PDException
- In any errorpublic Record CopyMono() throws PDException
PDException
- in any errorpublic Record CopyMulti() throws PDException
PDException
- in any errorpublic java.lang.String toString()
toString
in class java.lang.Object
public void addRecord(Record newRec) throws PDException
newRec
- Record with the Attributes to addPDException
- In any errorpublic void delRecord(Record substRec) throws PDException
substRec
- Record with the Attributs to removePDException
- In any Errorpublic void Verify() throws PDException
PDException
- If any Attribute don't match the restrictionspublic java.lang.String toXML() throws PDException
PDException
- in any errorpublic java.lang.String toXMLt() throws PDException
PDException
- in any errorpublic java.lang.String toXMLtNotNull() throws PDException
PDException
- in any errorpublic void CheckDef() throws PDExceptionFunc
Verify()
PDExceptionFunc
- In any errorpublic void DelNull()