Package org.apache.oodt.cas.metadata

Examples of org.apache.oodt.cas.metadata.SerializableMetadata


    private void ingestTestFile() {
        Metadata prodMet = null;
        StdIngester ingester = new StdIngester(transferServiceFacClass);

        try {
            prodMet = new SerializableMetadata(new FileInputStream(
                    "./src/testdata/ingest/test.txt.met"));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                    "./src/testdata/ingest").getCanonicalPath());
View Full Code Here


    private void doIngest() {
        Metadata prodMet = null;

        try {
            prodMet = new SerializableMetadata(new FileInputStream(
                    "./src/testdata/ingest/test.txt.met"));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                    "./src/testdata/ingest").getCanonicalPath());
View Full Code Here

    public void testIngest() {
        Metadata prodMet = null;

        try {
            prodMet = new SerializableMetadata(new FileInputStream(
                    "./src/testdata/ingest/test.txt.met"));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                    "./src/testdata/ingest").getCanonicalPath());
View Full Code Here

  private void ingestTestFile() {
    Metadata prodMet = null;
    StdIngester ingester = new StdIngester(transferServiceFacClass);

    try {
      prodMet = new SerializableMetadata(new FileInputStream(
          "./src/testdata/ingest/test.txt.met"));

      // now add the right file location
      prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
          "./src/testdata/ingest").getCanonicalPath());
View Full Code Here

    private void ingestTestFiles() {
        Metadata prodMet = null;
        StdIngester ingester = new StdIngester(transferServiceFacClass);

        try {
            prodMet = new SerializableMetadata(new FileInputStream(
                    "./src/testdata/ingest/test.txt.met"));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                    "./src/testdata/ingest").getCanonicalPath());
View Full Code Here

  }

  public void indexMetFile(File file, boolean delete)
      throws InstantiationException, FileNotFoundException, IOException,
      SolrServerException {
    SerializableMetadata metadata = new SerializableMetadata("UTF-8", false);
    metadata.loadMetadataFromXmlStream(new FileInputStream(file));
    if (delete) {
      server.deleteById(metadata.getMetadata("CAS." + CoreMetKeys.PRODUCT_ID));
    }
    server.add(this.getSolrDocument(metadata));
  }
View Full Code Here

    private void ingestTestFile() {
        Metadata prodMet = null;
        StdIngester ingester = new StdIngester(transferServiceFacClass);

        try {
            prodMet = new SerializableMetadata(new FileInputStream(
                    "./src/testdata/ingest/test.txt.met"));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                    "./src/testdata/ingest").getCanonicalPath());
View Full Code Here

   }

   protected void dumpMetadataIfRequested() throws Exception {
      if (Boolean.parseBoolean(pgeMetadata
            .getMetadata(DUMP_METADATA))) {
         new SerializableMetadata(pgeMetadata.asMetadata())
               .writeMetadataToXmlStream(new FileOutputStream(
                     getDumpMetadataPath()));
      }     
   }
View Full Code Here

            TransformerFactory transFact = TransformerFactory.newInstance();
            Transformer trans = transFact.newTransformer(xsltSource);
            boolean useCDATA = customArgs.length > 1 ? ((String) customArgs[1])
                    .toLowerCase().equals("true") : false;
            Source xmlSource = new DOMSource((new SerializableMetadata(
                    inputMetadata,
                    trans.getOutputProperty(OutputKeys.ENCODING), useCDATA))
                    .toXML());

            trans.setOutputProperty(OutputKeys.INDENT, "yes");
View Full Code Here

    private void doIngest() {
        Metadata prodMet = null;

        try {
            prodMet = new SerializableMetadata(new FileInputStream(
                    "./src/testdata/ingest/test.txt.met"));

            // now add the right file location
            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(
                    "./src/testdata/ingest").getCanonicalPath());
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.metadata.SerializableMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.