|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.endeca.index.record.Records
public class Records
Represents a list of records. In addition, supports having a "name" property name, that can uniquely identify a given record.
Created: November 16 2011
Nested Class Summary | |
---|---|
static class |
Records.ExposedIndentXMLWriter
An XMLWriter subclass that exposes a writeIndent() method. |
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string from source code control system. |
protected java.util.List<Record> |
mRecords
Our list of records. |
Constructor Summary | |
---|---|
Records()
|
Method Summary | |
---|---|
void |
addRecord(Record pRecord)
Add the specified record. |
protected Records.ExposedIndentXMLWriter |
createXMLWriter()
Create our XMLWriter. |
boolean |
exactlyEquals(Records pRecords)
Only equal if we have the same records in the same order. |
java.lang.String |
getAsXMLString(ApplicationLogging pLogging)
Get our records as an XMLString. |
protected java.lang.String |
getNameOfRecord(Record pRecord)
Get the name of the record, if any. |
java.lang.String |
getNamePropertyName()
Returns property namePropertyName. |
Record |
getOnlyRecordByName(java.lang.String pName)
Return the only record with the give name. |
java.util.List<Record> |
getRecords()
Return the list of all records (with an unmodifiable copy. |
java.util.List<Record> |
getRecordsByName(java.lang.String pName)
Get the list of records with the specified name property (as defined by the propertyNameProperty).* |
java.util.List<Record> |
getRecordsWithMatchingProperty(java.lang.String pPropertyName,
java.lang.String pPropertyValue)
Return all the records with the specified matching property. |
void |
readFromXML(java.io.InputStream pInputStream)
Read from an XML file. |
void |
removeRecord(Record pRecord)
Remove the specified record. |
void |
setNamePropertyName(java.lang.String pNamePropertyName)
Sets property namePropertyName. |
java.lang.String |
toString()
|
void |
writeAsXML(java.io.Writer pWriter,
boolean pWriteXMLDeclaration,
boolean pPrettyPrint,
boolean pIncludeStandalone)
Write the record out as XML. |
protected void |
writeXMLDeclaration(java.io.Writer pWriter,
java.lang.String pXMLVersion,
java.lang.String pEncoding)
Write the XML Declaration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected java.util.List<Record> mRecords
Constructor Detail |
---|
public Records()
Method Detail |
---|
public void setNamePropertyName(java.lang.String pNamePropertyName)
public java.lang.String getNamePropertyName()
public void addRecord(Record pRecord)
pRecord
- the record to be added.public void removeRecord(Record pRecord)
public java.util.List<Record> getRecordsByName(java.lang.String pName)
pName
- the name of list of records to get.
public Record getOnlyRecordByName(java.lang.String pName)
pName
- the name of the record to get.public java.util.List<Record> getRecords()
public java.util.List<Record> getRecordsWithMatchingProperty(java.lang.String pPropertyName, java.lang.String pPropertyValue)
pPropertyName
- the name of the property value to match.pPropertyValue
- the value of the property to match.
protected java.lang.String getNameOfRecord(Record pRecord)
pRecord
- the record whose name to get.
protected void writeXMLDeclaration(java.io.Writer pWriter, java.lang.String pXMLVersion, java.lang.String pEncoding) throws java.io.IOException
pWriter
- the writerpXMLVersion
- the XML version.pEncoding
- the character encoding.
java.io.IOException
public java.lang.String getAsXMLString(ApplicationLogging pLogging)
pLogging
- the logger to use if an exception is thrown.public void writeAsXML(java.io.Writer pWriter, boolean pWriteXMLDeclaration, boolean pPrettyPrint, boolean pIncludeStandalone) throws java.io.IOException, atg.repository.search.indexing.XMLWriterException
pWriter
- the writer to write to.pWriteXMLDeclaration
- there to write an XML declaration.pPrettyPrint
- whether to do indentation.pIncludeStandalone
- whether th include the "standalone"
in the root element.
java.io.IOException
atg.repository.search.indexing.XMLWriterException
public void readFromXML(java.io.InputStream pInputStream) throws java.io.IOException
pInputStream
- the input stream to read from.
java.io.IOException
public boolean exactlyEquals(Records pRecords)
pRecord
- the records object to compare ourself too.
protected Records.ExposedIndentXMLWriter createXMLWriter()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |